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 :

  1. copy source /source
  2. 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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -