-
Notifications
You must be signed in to change notification settings - Fork 111
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
Several improvements to build speed and handling of symlinks #19
base: master
Are you sure you want to change the base?
Conversation
Overall I like the changes, but I have a few comments. Regarding The caching support is great. Although I think it is not sufficient to only look at the files in the Dockerfile, we must also take into account:
There is also the case of ADD instructions with URLs as source, but we can probably skip that. It would be good if there was some task to force a build and skip the cache. I like that |
Thanks for the feedback!
You can kind of do this already (and we actually do in our project) by defining your own taskKey and doing
Done. We now canonicalize the
Fixed.
The name is used as the cache file for sbt, so if it changes, the cache will be invalidated.
Added
Sure, do you have a name you'd prefer?
Yeah, I could try and do this, but we already fork for the |
I'm on vacation this and next week, will take a look at this when I get
|
Hi again, Sorry about the delay. Great changes in the last commit! There are few (minor) things left before I think it can be merged. I rather see that we remove Regarding the Everywhere where you use the I think that the current solution with naming archives with a randomized name and later changing its corresponding ADD instruction (in the caching process) could have been handled in a better way. I have tried a solution where the naming of files in the docker context is postponed from creation of the instruction to the build phase of the image. I'm still experimenting with it, so lets see how it turns out. Regarding |
Awesome, I like I'll remove If you have time to investigate |
Sorry for the pretty large PR, but I was wondering if you would be interested in merging some changes that we have been using. This PR adds the following features:
baseDockerImage
, which contains transitive dependencies and other container environment, and adockerfile
which contains only the jars for your project.addCompressed
is added toDockerFile
. This command usestar czf
to create an archive that is shipped to the docker daemon. Unlike the normaladd
command, this command correctly handles symlinks.