dockerfile - Modifying a docker image -


i have started working on docker. have downloaded docker image , want change in way can copy folder contents local image or may edit file in image.

i thought if can extract image somehow, changes , create 1 image. not sure if work that. tried looking options couldn't find promising solution it.

the current dockerfile image this:

from abc/def maintainer humpty dumpty <@hd>   run sudo apt-get install -y vim  add . /home/humpty-dumpty workdir /home/humpty-dumpty run cd lib && make  cmd ["bash"] 

note:- looking easy , clean way change existing image , not create new image changes.

first of all, not recommend messing other image. better if can create own. moving forward, can use copy command add folder host machine docker image.

 copy <src> <dest> 

the caveat <src> path must inside context of build; cannot copy ../something /something, because first step of docker build send context directory (and subdirectories) docker daemon.

from abc/def maintainer humpty dumpty <@hd>   run sudo apt-get install -y vim  // make sure have /home/humpty-dumpty directory // if not create 1 run mkdir -p /home/humpty-dumpty   copy test /home/humpty-dumpty/ // add test directory home/humpty-dumpty workdir /home/humpty-dumpty run cd lib && make  cmd ["bash"] 

Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -