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

Reduce size of Docker image by removing Python3 etc. #314

Open
MurakamiShinyu opened this issue Jul 3, 2022 · 1 comment
Open

Reduce size of Docker image by removing Python3 etc. #314

MurakamiShinyu opened this issue Jul 3, 2022 · 1 comment

Comments

@MurakamiShinyu
Copy link
Member

MurakamiShinyu commented Jul 3, 2022

Previously, we reduced the Docker image size by not installing WebKit and Firefox that are installed in the Playwright official Docker image:

However, the latest Docker image ghcr.io/vivliostyle/cli:5.2.1 size is bigger (2.25GB) because we added large fonts in the Docker image:


I tried to further reduce the image size, but without success.

I tried to use "node:16-buster-slim" as base instead of "ubuntu:focal" and nodejs install but got warning "your OS is not officially supported by Playwright" and error "E: Package 'ttf-ubuntu-font-family' has no installation candidate".

Then, I tried to uninstall python3.8 that was installed when nodejs was installed:

&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs \

I tried to purge all python3* packages by apt-get purge -y libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib python3 python3-minimal python3.8 python3.8-minimal. The result was that it removed not only python3 but also nodejs. (nodejs depends on python3-minimal)

... I realized that removing python3 packages is not very good idea. It's less effective, the saving size will be about 24MB that is not very large compared to the current Docker image size.

@MurakamiShinyu MurakamiShinyu changed the title Reduce size of Docker image by removing Python3 Reduce size of Docker image by removing Python3 etc. Jul 4, 2022
@MurakamiShinyu
Copy link
Member Author

Current vivliostyle-cli docker image size is very big because of installed fonts,

To reduce the docker image size, we might need to reconsider the installed fonts.

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

1 participant