-
-
Save vovimayhem/6437c2f03b654e392ccf3e9903eba6af to your computer and use it in GitHub Desktop.
# 1: Use node 6 as base: | |
FROM node:6-alpine | |
# 2: Download+Install PhantomJS, as the npm package 'phantomjs-prebuilt' won't work on alpine! | |
# See https://github.com/dustinblackman/phantomized | |
RUN set -ex \ | |
&& apk add --no-cache --virtual .build-deps ca-certificates openssl \ | |
&& wget -qO- "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C / \ | |
&& npm install -g phantomjs \ | |
&& apk del .build-deps |
Thanks @StrangePeanut
Yup, living the pain right now. One of hour legacy apps can't build because this tarball is missing. Trying to build phantomized from source is also giving me issues.
Hi @maldetect,
Finally, we decided to remove the dependency to PhantomJS from our project because of all this pain.
I think, I saved this tarball somewhere. I will try to upload here tomorrow.
@CanadianCommander-Work Have you been able to build phantomize or found another solution?
Hi @maldetect,
Finally, we decided to remove the dependency to PhantomJS from our project because of all this pain.
I think, I saved this tarball somewhere. I will try to upload here tomorrow.
any update?
I cant confidently say that PDFs are 100% being generated correctly but I was able to use a previous image that used this project to generated my own .tar.gz and get the build to pass.
docker cp <container-name>:/ <out-dir>
- I removed all files except those listed here dustinblackman/phantomized#1
tar -zcf phantomize.tar.gz ./lib ./lib64 ./usr/lib
- Uploaded the tar.gz and updated the URL in my docker file.
Hopefully the package author wakes up and uploads an offical .gz
I fixed it like this. It works.
RUN apk add --update --no-cache curl && \
if curl -Ls "https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz" | tar xz -C /; then \
echo "Downloaded and extracted from first URL"; \
else \
echo "First URL failed, attempting second URL"; \
curl -k -Ls "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2" | tar -jxvf - -C / && \
cp phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm -fR phantomjs-${PHANTOMJS_VERSION}-linux-x86_64; \
fi && \
apk del curl
WORKDIR /usr/src/app
Hi,
I finally found it. Here is the share: https://drive.google.com/file/d/1CEdvkwG0-bKNTlE2AmYOQ1PCiY0t3TmE/view?usp=sharing
This what I used in my Dockerfile:
# PhantomJs
RUN apk add --update --no-cache curl tar &&\
cd /tmp && curl -Ls https://github.com/dustinblackman/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz | tar xz &&\
cp -R lib lib64 / &&\
cp -R usr/lib/x86_64-linux-gnu /usr/lib &&\
cp -R usr/share/fonts /usr/share &&\
cp -R etc/fonts /etc &&\
curl -k -Ls "https://drive.google.com/uc?export=download&id=1CEdvkwG0-bKNTlE2AmYOQ1PCiY0t3TmE" | tar -jxf - &&\
# curl -k -Ls https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 | tar -jxf - &&\
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs &&\
rm -rf /tmp/*
I have this file as well:
- phantomjs-alpine-x86_64.tar.bz2 - https://drive.google.com/file/d/1meTCsgvjW6ALWV6iiJvczKzlHsIiBP8s/view?usp=sharing
But I don't remember where I used it and where I took it
i found it on https://archive.org/web/web.php and downloaded it.
@CanadianCommander-Work Have you been able to build phantomize or found another solution?
I actually did mange to build the tar
. I sort of gave up building phantomized
from source. When you look at what that repo actually does, it is actually just a script that runs dockerize
... no not the golang version, the python version which is completely different. It basically just copies a bunch of binaries needed by phantomJS in to a tar ball. So I just started an Ubuntu18 container and followed the script steps by hand. This allowed me to generate the tar ball. Needless to say, I've put a Jira ticket in to remove our dependence on PhantomJS.
I've found a solution. This is the solution I use in my docker file.
ENV PHANTOMJS_VERSION=2.1.1
RUN apk update && apk add --no-cache fontconfig curl curl-dev &&
cd /tmp && curl -Ls "https://drive.google.com/uc?export=download&id=1Lm-QjJ3WmPv5X3xI_3eVF1CxfQ02wCl0" | tar xz &&
cp -R phantomjs/lib phantomjs/lib64 / &&
cp -R phantomjs/x86_64-linux-gnu /usr/lib &&
cp -R phantomjs/share /usr/share &&
cp -R phantomjs/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
I fork this repository and publish release again.
you can use this link instead.
https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
cd /tmp && curl -Ls https://github.com/topseom/phantomized/releases/download/2.1.1a/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 &&
this not working with above url https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
error
cp: can't stat 'usr/share': No such file or directory
also cp: can't stat 'lib': No such file or directory
cp: can't stat 'lib64': No such file or directory
@shashank34 I see
I create new tag 2.1.1 for full tar file use this link :
https://github.com/topseom/phantomized/releases/download/2.1.1/dockerized-phantomjs.tar.gz
use tag 2.1.1a for slim version ( only lib,lib64,usr/lib ) use this link : https://github.com/topseom/phantomized/releases/download/2.1.1a/dockerized-phantomjs.tar.gz
Thank you @topseom.
Please is this new link working?
Its working, just tried it.
Thanks @topseom .. Created a backup release in case shit happens again: https://github.com/Nuxify/phantomized/releases/tag/2.1.1
@floviolleau any solution? I am facing the same issue