-
Notifications
You must be signed in to change notification settings - Fork 0
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
Don't update image if local repository changes #13
Comments
Here are some ideas to consider: Option 1 (AI)To address the issue of Docker rebuilding the image every time the local repository changes, we could separate the build of the local repository from the rest of the Dockerfile.
Option 2 v1We could add another CLI flag (e.g --local-repository-update-only). --local-repository would still be required for the first build. However if the user only wanted to update dependencies using "apt update && apt upgrade" then --local-repository-update-only would be mounted at run time but not copied at build time. This puts the onus on the user and maybes makes the CLI options a bit more confusing.
This idea is rejected but I'll leave it here in case it helps generate new ideas. Option 2 v2Add another CLI flag --update-only which will not rebuild the image but it will run apt update && apt upgrade and then write the image.
|
The dockerfile has
If the remote apt repositories change then the docker image doesn't have to be rebuilt (however it can be rebuilt with --no-cache).
If the local apt repository changes then the docker image must be rebuilt (because it uses COPY).
This is problematic because:
The local repository stage must happen at build time before other dependencies are installed because a dependency in the control file might only exist in the local repository.
The text was updated successfully, but these errors were encountered: