Open Shubhamdutta2000 opened 3 years ago
i have the same problem with docker container
I am facing same issues. Did you get any solutions? Would really appreciate any suggestions @dieyne @Shubhamdutta2000
@ashish-garg-25 In my memory I think I solved it with the following lines And I put these lines in my dockerfile, for your case I imagine with Linux you may need to install these packages.
ENV PHANTOMJS_VERSION=2.1.1
ENV PHANTOMJS_PATH=/usr/local/bin/phantomjs
RUN apk update && apk add --no-cache fontconfig curl curl-dev && \
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/${PHANTOMJS_VERSION}/dockerized-phantomjs.tar.gz | tar xz && \
cp -R lib lib64 / && \
cp -R usr/lib/x86_64-linux-gnu /usr/lib && \
cp -R usr/share /usr/share && \
cp -R etc/fonts /etc && \
curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 | tar -jxf - && \
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
okay! thanks @dieyne
Hi @ashish-garg-25, did @dieyne solution work? We are facing a similar problem on alpine Linux.
It is working perfectly in the windows and mac OS.
But when I use this in Linux environment it throws some error (I will attach the error below) that's why my PDF is not created and my node server crashes.