-
Notifications
You must be signed in to change notification settings - Fork 9
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
Reduce build dependencies in Dockerfile #60
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the resulting image is missing py3-setuptools
which is required to run
orjson has binary wheels for musl on amd64 and arm64 and pip doesn't need to be installed at runtime site-packages uses the most storage, so a multi-stage build doesn't help reduce it further
Sorry about that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you so much!
addgroup -g 1000 -S priviblur && \ | ||
adduser -u 1000 -S priviblur -G priviblur && \ | ||
pip3 install --break-system-packages -r requirements.txt && \ | ||
apk add --no-cache py3-pip && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move this here instead of the first line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it'd be slightly more clear to only declare the long-lived, runtime dependencies there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like a mistake honestly :')
Also, you should have added a comment to say that it's only a build dependency
orjson
is already installed as a musl binary (on amd64 and arm64).site-packages
uses the most storage, so a multi-stage build (like copying a venv) doesn't help reduce it further. (Although it would help if you do want to build from source packages)Fixes #58