Created
September 18, 2022 23:06
-
-
Save mwikala/22001f9e8a1adc5052220b1f722f0c44 to your computer and use it in GitHub Desktop.
Add wkhtmltopdf to Laravel Sail (Docker) on M1 Macbook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM --platform=linux/amd64 ubuntu:20.04 | |
# ... Other commands | |
# Install dependencies | |
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list \ | |
&& apt-get update \ | |
&& apt-cache policy libssl1.0-dev \ | |
&& apt-get install -y libssl1.0-dev libfontconfig zlib1g libfreetype6 libxrender1 libxext6 libx11-6 \ | |
&& apt-get -y autoremove \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Install wkhtmltopdf binaries | |
RUN curl -L -o wkhtmltopdf.tar.xz https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz \ | |
&& tar -xf wkhtmltopdf.tar.xz \ | |
&& mv wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf \ | |
&& chmod +x /usr/local/bin/wkhtmltopdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment