Add selinux flag to docker command

This tells docker to set the appropriate SELinux flags on the
volume mounted in the docker container.  This is necessary on
selinux systems, and harmless on my ubuntu xenial machine.

The flag is present as of docker 1.7.

For more info, see: http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/

Change-Id: I5773b7c60ee8309ff2f8b02467576666da229874
This commit is contained in:
James E. Blair 2018-03-26 09:26:15 -07:00
parent 9141ae5a45
commit 394eec8024
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ the web app with:
.. code-block:: bash
docker run -it --rm -v $(PWD):/usr/src/app -w /usr/src/app node:alpine \
docker run -it --rm -v $(PWD):/usr/src/app:z -w /usr/src/app node:alpine \
npm run build:dist-with-depends
Both do the same thing. Both versions will result in the built files being

View File

@ -22,7 +22,7 @@
"build": "npm run build:dist",
"build:dev": "webpack --env=dev",
"build:dist": "webpack --env=prod",
"build:docker": "docker run -it --rm -v $(pwd):/usr/src/app -w /usr/src/app node:alpine npm run build:dist-with-depends",
"build:docker": "docker run -it --rm -v $(pwd):/usr/src/app:z -w /usr/src/app node:alpine npm run build:dist-with-depends",
"build:dist-with-depends": "yarn install && npm run build:dist",
"format": "eslint --fix web/*.js",
"lint": "webpack --env=lint",