Sign inSign up

sribasu/ubuntu20_node10_phantomjs2

By sribasu

•Updated almost 4 years ago

Docker image built on Ubuntu20.04 with NodeJS v10 and PhantomJS 2.1 preinstalled

Image
0

227

sribasu/ubuntu20_node10_phantomjs2 repository overview

This Docker image is built on Ubuntu 20.04 where NodeJS v10 and PhantonJS v2.1 in pre-installed. Auto-installation of PhantomJS doesn't work on alpine linux Docker images. This image will eliminate the need for phantomjs auto installation through a NodeJS library. Instead the PhantomJS based NodeJS libraries can directly access phantomjs from path.

Developer: Prithwiraj Bose⁠

⁠Code for Dockerfile

FROM ubuntu:20.04
MAINTAINER [email protected]
RUN apt update
WORKDIR /
RUN apt install -y curl
RUN curl -sL https://deb.nodesource.com/setup_10.x -o /tmp/nodesource_setup.sh
RUN bash /tmp/nodesource_setup.sh
RUN apt install -y nodejs

After creating the Docker image with the above mentioned code, following commands are executed manually inside a container created from the image:

RUN apt-get install wget build-essential chrpath libssl-dev libxft-dev -y
RUN apt-get install libfreetype6 libfreetype6-dev -y
RUN apt-get install libfontconfig1 libfontconfig1-dev -y
RUN export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
RUN wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
RUN tar xvjf $PHANTOM_JS.tar.bz2
RUN mv $PHANTOM_JS /usr/local/share
RUN ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
RUN phantomjs --version

Finally the container is committed to the final Docker image available here.

Tag summary

Content type

Image

Digest

sha256:a0042b8da…

Size

247.1 MB

Last updated

almost 4 years ago

docker pull sribasu/ubuntu20_node10_phantomjs2