-
Notifications
You must be signed in to change notification settings - Fork 347
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
Unbundled binaries #129
base: master
Are you sure you want to change the base?
Unbundled binaries #129
Conversation
@@ -4,4 +4,8 @@ ENV DEBIAN_FRONTEND noninteractive | |||
|
|||
RUN pacman -Sy --noconfirm ruby fontconfig freetype2 libjpeg libpng libxext libxrender | |||
|
|||
WORKDIR /root/wkhtmltopdf_binary_gem | |||
COPY . . |
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.
This repo too heavy to copy all into the image. Why you copy it? We could mount directly repo folder to run
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.
This PR is specifically to make this repo not heavy
This would be great. Building a docker image with this gem creates a lot of unnecessary bloat to that base image. |
After 0.12.5 the gem size more than quadrupled inside because of a change to how wkhtmltopdf generates their binaries. This pull request removes the bundled binaries and instead downloads the appropriate binary from https://wkhtmltopdf.org/downloads.html based on the operating system and CPU architecture.
This pull request reduces the gem size down to just 6.5K. It also adds support for Amazon Linux 2, which did not appear to be working properly before.
Test Confirmed Supported Platforms
Amazon Linux 2
Arch Linux
CentOS 6
CentOS 7
CentOS 8
Debian 9
Debian 10
Rocky Linux 8
Ubuntu 16
Ubuntu 18
Ubuntu 20
macOS(Can't seem to run on M1 mac)Caveats