-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] Added Dockerfile for wkhtmltox v0.12.6-1
- Loading branch information
1 parent
9d6a013
commit 6b4fc1e
Showing
3 changed files
with
51 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
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-bullseye | ||
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