First of all, i installed Sylius using the following command :
git clone [email protected]:Sylius/Sylius-Standard.git sylius && cd sylius && make init
I tried to add the wkhtmltopdf binary file to the Sylius Docker container following this tutorial: https://blog.bitexpert.de/blog/sylius_docker_alpine_wkhtmltopdf
I modified the existing compose.override.yml as follows:
php:
build: ./Docker/
user: ${DOCKER_USER:-1000:1000}
And for the Dockerfile, I did the following:
FROM surnet/alpine-wkhtmltopdf:3.16.2-0.12.6-full as wkhtmltopdf
FROM ghcr.io/sylius/sylius-php:8.2-fixuid-xdebug-alpine AS base
USER root
# persistent / runtime deps
RUN apk add --no-cache
acl
file
gettext
unzip
libstdc++
libx11
libxrender
libxext
libssl3
openssl
ca-certificates
fontconfig
freetype
ttf-droid
ttf-freefont
ttf-liberation
;
RUN ln -s /lib/libssl.so.1.1.1 /usr/lib/libssl.so.1.1 &&
ln -s /lib/libcrypto.so.1.1.1 /usr/lib/libcrypto.so.1.1
# Copy needed wkhtmltopdf files from wkhtmltopdf image
COPY --from=wkhtmltopdf /bin/wkhtmltoimage /bin/wkhtmltopdf /bin/libwkhtmltox* /usr/local/bin/
However, when I ran the “build”, I couldn’t find the wkhtmltopdf file in /usr/local/bin/.