Skip to content
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

Question about any idea to reduce the docker image size #65

Open
jiangyh91 opened this issue Jul 31, 2024 · 1 comment
Open

Question about any idea to reduce the docker image size #65

jiangyh91 opened this issue Jul 31, 2024 · 1 comment

Comments

@jiangyh91
Copy link

Hi, thanks for maintianing this repo up to date.
The docker image size on my server takes 1.29GB, which I am feeling is relatively too big compare with the image's feature.
I am not a expert user of docker, feel free to fix me if I say anything wrong.
From the Dockerfile, I can see few things we can do to reduce the image size.

  1. Switched to alpine:latest for a smaller base image.

FROM alpine:latest or maybe any python ready image?

  1. Combined unnecessary RUN instructions to reduce the number of layers.

RUN apt-get -y install ${PYTHON}-pip && \ apt-get -y install ${PYTHON}-selenium && \ apt-get -y install ${PYTHON}-pyotp && \ apt-get -y install curl wget etc.

What do you think about above ideas? Thank you.

@neothematrix
Copy link
Owner

Hi, thanks for your comment!
The image size is largely due to the chromium and Chrome driver needed by the python code to emulate a real browser, I'm not sure it could be reduced or if alpine based images can be used, if you manage to try I'd be happy to accept PRs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants