dockerfile - Docker Image move to the src directory -
so , have project , want have docker image project. directory is:
--dockerfile --source
so in dockerfile have commands :
- copy source /source
- run cd source image built fine , when run container last statement cd source not executed.
ps. tried using workdir instead of run cd , contents of source not copied. work-around statement cd source executed on own?
use workdir
command set work directory through dockerfile, can change workdir part of docker run
command switch -w
see full docs reference: http://docs.docker.com/reference/builder/#workdir
and docker run switch: http://docs.docker.com/reference/run/#workdir
Comments
Post a Comment