Skip to content

Commit

Permalink
feat: add wkhtmltoimage to bin
Browse files Browse the repository at this point in the history
  • Loading branch information
akiyashkin-ronasit committed Jul 11, 2024
1 parent 23b7d8a commit a8070ac
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
FROM surnet/alpine-wkhtmltopdf:3.16.2-0.12.6-full as wkhtmltopdf
FROM webdevops/php-nginx-dev:8.1-alpine

FROM --platform=$BUILDPLATFORM surnet/alpine-wkhtmltopdf:3.20.0-0.12.6-full AS wkhtmltopdf
FROM --platform=$BUILDPLATFORM ghcr.io/ronasit/php-nginx-dev:8.1

# wkhtmltopdf install dependencies
RUN apk add --no-cache \
libstdc++ \
libc6-compat \
libx11 \
libxrender \
libxext \
libssl1.1 \
libssl3 \
ca-certificates \
fontconfig \
freetype \
ttf-droid \
ttf-freefont \
ttf-liberation \
libc6-compat
autoconf \
g++ \
make \
linux-headers

ARG TARGETARCH
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /app/vendor/h4cc/wkhtmltopdf-${TARGETARCH}/bin/wkhtmltopdf-${TARGETARCH}
COPY --from=wkhtmltopdf /bin/wkhtmltopdf /bin/wkhtmltopdf

COPY --from=wkhtmltopdf /bin/wkhtmltoimage /app/vendor/h4cc/wkhtmltoimage-${TARGETARCH}/bin/wkhtmltoimage-${TARGETARCH}
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /bin/wkhtmltoimage

COPY --from=wkhtmltopdf /bin/wkhtmltopdf /app/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64
RUN chmod +x /app/vendor/h4cc/wkhtmltopdf-${TARGETARCH}/bin/wkhtmltopdf-${TARGETARCH}
RUN chmod +x /bin/wkhtmltopdf
RUN chmod +x /bin/wkhtmltoimage

0 comments on commit a8070ac

Please sign in to comment.