-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild container if specified files has changed #6936
Comments
I really like this idea. However I find it unlikely that it will go in. As a workaround, you can do some stuff around the npm |
Well, yes it can be achieved by wrapping docker-compose in some kind of entry point script where the entry point is responsible for calculating checksums and rebuilding images but its more convenient to have such functionality built into docker-compose. I must say it's not only related to nodejs. Lets say puthon has its onw requirements, go and so on. |
Actually what you suggest could be better implemented relying on BuildKit as the build engine, as this one do offer very efficient caching and will be able to "rebuild" your image within a second if no change took place on source tree. |
Sounds like a resurection of #184 |
Closing as a duplicate for #184 which has already many core contributors of docker-compose watching, and a few proposals. |
Hi. The main idea of this feature request is the ability to specify a list of files on which image depends and rebuilds automatically.
It can be really helpful to just declaratively tell a service, when I want it to rebuild
How it can be used ?
For example we have a simple
nodejs
service.We can add something like
hash
orchecksum
or you name it.And now when one of these files in checksum changes,
docker-compose up webapp
will automatically rebuild an image.This requires a place where docker-compose can store checksums for images and check those against newly calculated ones.
Also, it is a good idea, IMHO, to new command called checksum which calculates and prints the same checksum as it will be used to make the decision to rebuild an image
The text was updated successfully, but these errors were encountered: