CyCoreSystems / docker-meteor

Dockerfile and script for running Meteor on Docker
MIT License
120 stars 73 forks source link

best practive to hot push new code into a running container #39

Closed abate closed 7 years ago

abate commented 7 years ago

what is the best practice you recommend ? Ideally I'd like to trigger a git pull inside a running container and have meteor doing the rest. I'm using '''docker-compose''' so I guess it would be possible to just run a command inside the container. I'm wondering if this is the best way of doing this, or I'm missing something. Maybe adding a simple script in the container to do the job ?

thank you !

Ulexus commented 7 years ago

There is not facility for this, and I would be against it, in general. A container should, in my opinion, be an immutable image. Instead, just spin up a new container, referencing the git repository with the REPO environment variable.

Philosophical objections aside, the container exec's node; there is nothing else in place to handle any kind of reload-and-replace functionality.