-
Notifications
You must be signed in to change notification settings - Fork 34
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
Slim down Autograph container #861
base: main
Are you sure you want to change the base?
Conversation
- build binaries in separate stage and copy to final stage - install deb packages with --no-install-recommends - remove apt-get lists - and .git directory to dockerignore
This passed the integration test, though I noticed some of these in the output on CircleCI:
I'm guessing that comes from here
Is the SHA itself important here? Maybe there's another value we can provide, or maybe it's not important in a CI setting? If we do need it, maybe we can provide it as a build arg or environment variable. |
N.B.: Remote settings does some gnarly stuff for testing. This is not a "guaranteed interface", but it'd be nice not to break it. |
@grahamalama so, @oskirby updated the dockerfile in similar ways just now. Is there still stuff left on table for us to do? |
(That comment was directed @grahamalama. Edited to be more clear!) |
6b5a81f
to
85f78d9
Compare
@jmhodges did you mean to link to this PR? It seems to get more into the nitty gritty of the Dockerfile than #897. I'm not seeing any PR that does quite the same thing as this one, but maybe these changes could be folded into one of the ones from @oskirby. #898 seems to make the image (just a bit) larger, but I don't see a reason why we couldn't apply similar strategies (multistage build, cleaning after we use |
The
autograph
container is large, which makes pulling it in CI pipelines pretty time consuming. I looked for anything we could do to make it smaller to speed up pulls, and I came up with these "quick wins":--no-install-recommends
apt-get
lists as a cleanup step.git
directory to.dockerignore
These changes make for a 44% reduction of the size of the compressed container