forked from acsone/kwkhtmltopdf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request acsone#18 from foodles-tech/agaldeano/add-0-12-6-1…
…-wkhtmltox-dockerfile [IMP] Added Dockerfile for wkhtmltox v0.12.6-1
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# first stage: build kwkhtmltopdf_server | ||
|
||
FROM --platform=linux/amd64 docker.io/golang:1.23.3 | ||
WORKDIR /tmp | ||
COPY server/kwkhtmltopdf_server.go . | ||
RUN go build kwkhtmltopdf_server.go | ||
|
||
# second stage: server with wkhtmltopdf | ||
|
||
FROM --platform=linux/amd64 docker.io/ubuntu:22.04 | ||
|
||
RUN set -x \ | ||
&& apt update \ | ||
&& apt -y install --no-install-recommends \ | ||
wget \ | ||
ca-certificates \ | ||
fonts-liberation2 \ | ||
fontconfig \ | ||
libjpeg-turbo8 \ | ||
libx11-6 \ | ||
libxext6 \ | ||
libxrender1 \ | ||
xfonts-75dpi \ | ||
xfonts-base \ | ||
fonts-lato \ | ||
&& wget -q -O /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb \ | ||
&& echo "800eb1c699d07238fee77bf9df1556964f00ffcf /tmp/wkhtmltox.deb" | sha1sum -c - \ | ||
&& dpkg -i /tmp/wkhtmltox.deb \ | ||
&& apt -f install \ | ||
&& apt -y purge wget --autoremove \ | ||
&& apt -y clean \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& rm /tmp/wkhtmltox.deb | ||
|
||
COPY --from=0 /tmp/kwkhtmltopdf_server /usr/local/bin/ | ||
|
||
RUN adduser --disabled-password --gecos '' kwkhtmltopdf | ||
USER kwkhtmltopdf | ||
ENV LANG=C.UTF-8 | ||
ENV LC_ALL=C.UTF-8 | ||
|
||
EXPOSE 8080 | ||
CMD ["/usr/local/bin/kwkhtmltopdf_server"] |
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