Docker updating image along when dockerfile changes

前端 未结 3 1458
执笔经年
执笔经年 2021-01-31 00:59

I\'m playing with docker by creating a Dockerfile with some nodejs instructions. Right now, every time I make changes to the dockerfile I recreate the image by runn

3条回答
  •  不思量自难忘°
    2021-01-31 01:57

    During development, it makes less sense to re-build a whole container for every commit. Later, you can automate building a Docker container with your latest code as part of your QA/deployment process.

    Basically, you can choose to make a minimal container that pulls in code (using git when starting the container, or using -v /home/myuser/mynode:/home/myuser/mynode with ENTRYPOINT to run node).

    See my answer to this question:

    Docker rails app and git

提交回复
热议问题