Skip to content

Commit

Permalink
feat: Only install phantomjs in root image
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Jul 9, 2018
1 parent d79e670 commit f510d19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 2 additions & 8 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
FROM debian:stretch-slim
LABEL maintainer="zodern"
RUN apt-get update && \
apt-get install -y curl python make g++ bzip2 libfontconfig1 libfreetype6 ca-certificates --no-install-recommends && \
apt-get install -y curl python make g++ bzip2 ca-certificates --no-install-recommends && \
rm -rf /var/lib/apt/lists/*
RUN export VERSION="2.1.1" && \
curl -L -o ./phantomjs.tar.bz2 https://github.com/Medium/phantomjs/releases/download/v$VERSION/phantomjs-$VERSION-linux-x86_64.tar.bz2 && \
mkdir phantomjs && \
tar xvjf phantomjs.tar.bz2 -C ./phantomjs --strip-components=1 && \
mv phantomjs /usr/local/share && \
ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
rm -rf ./phantomjs ./phantomjs.tar.bz2

RUN useradd --create-home --shell /bin/bash --uid 1000 --user-group app

RUN mkdir /built_app
Expand Down
10 changes: 10 additions & 0 deletions root-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
FROM zodern/meteor
LABEL maintainer="zodern"
USER root
RUN apt-get update && \
apt-get install -y libfontconfig1 libfreetype6 && \
rm -rf /var/lib/apt/lists/*
RUN export VERSION="2.1.1" && \
curl -L -o ./phantomjs.tar.bz2 https://github.com/Medium/phantomjs/releases/download/v$VERSION/phantomjs-$VERSION-linux-x86_64.tar.bz2 && \
mkdir phantomjs && \
tar xvjf phantomjs.tar.bz2 -C ./phantomjs --strip-components=1 && \
mv phantomjs /usr/local/share && \
ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
rm -rf ./phantomjs ./phantomjs.tar.bz2
ONBUILD USER root
ONBUILD ARG NODE_VERSION='4.8.4'
ONBUILD RUN bash ./scripts/onbuild-node.sh
Expand Down

0 comments on commit f510d19

Please sign in to comment.