-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Dockerfile multiphase build cache issues #3116
Comments
Can you gist the output of a deploy before and after running |
Can you run |
@josegonzalez I took a look and the image from the |
Not sure there is a great way around that, given our deployment methodology. Any image cleanup will break this, so perhaps having folks manage that on their own when they are using multi-stage builds is the best way? |
Looks like we might be able to leverage dockfmt to list all stages in an image, and then build the image by specifying targets/tagging each layer. We'd then avoid removing tagged layers during the cleanup stage. |
So my original plan won't work unless each stage is named, meaning we would have to either drop the cache-fix for non-named stages or rewrite the dockerfile to ensure each stage is named. I don't know how I feel about either, though the later method is probably possible using a fun regex and the |
hello, I think i have solution for this, I'm looking a way to cache my package manager dont have to reinstall every time have CI build or dokku build on server and now I have it https://github.com/dokku/dokku/blob/c1df31b106da6eb8c7897deea67c143e2b5e611a/docs/deployment/builders/dockerfiles.md in my case I'm using pnpm (the same like npm or yarn) and I spend about 10 minutes or 20 minutes for each time package.json file change, and with the new command, It can save me about 5 minutes build time, which save alot of money sir :
|
High Level Spec
Original Post
Description of problem:
Let's say I use this Dockerfile:
Dockerfile.txt
report.txt
Environment details (AWS, VirtualBox, physical, etc.):
vps
How was Dokku installed?:
znz.dokku ansible galaxy role
How reproducible:
every time
Steps to Reproduce:
Dockerfile
attachedActual Results:
RUN echo
in builder phase is not cachedExpected Results:
RUN echo
is cached as indocker build .
runAdditional info:
main phase builds are cached correctly by content! I.e. changing the exact method of creating some_file.txt in build phase doesn't affect caching in the main phase.
The text was updated successfully, but these errors were encountered: