Skip to content

Commit f510d19

Browse files
committed
feat: Only install phantomjs in root image
1 parent d79e670 commit f510d19

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

image/Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
11
FROM debian:stretch-slim
22
LABEL maintainer="zodern"
33
RUN apt-get update && \
4-
apt-get install -y curl python make g++ bzip2 libfontconfig1 libfreetype6 ca-certificates --no-install-recommends && \
4+
apt-get install -y curl python make g++ bzip2 ca-certificates --no-install-recommends && \
55
rm -rf /var/lib/apt/lists/*
6-
RUN export VERSION="2.1.1" && \
7-
curl -L -o ./phantomjs.tar.bz2 https://github.com/Medium/phantomjs/releases/download/v$VERSION/phantomjs-$VERSION-linux-x86_64.tar.bz2 && \
8-
mkdir phantomjs && \
9-
tar xvjf phantomjs.tar.bz2 -C ./phantomjs --strip-components=1 && \
10-
mv phantomjs /usr/local/share && \
11-
ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
12-
rm -rf ./phantomjs ./phantomjs.tar.bz2
6+
137
RUN useradd --create-home --shell /bin/bash --uid 1000 --user-group app
148

159
RUN mkdir /built_app

root-image/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
FROM zodern/meteor
22
LABEL maintainer="zodern"
33
USER root
4+
RUN apt-get update && \
5+
apt-get install -y libfontconfig1 libfreetype6 && \
6+
rm -rf /var/lib/apt/lists/*
7+
RUN export VERSION="2.1.1" && \
8+
curl -L -o ./phantomjs.tar.bz2 https://github.com/Medium/phantomjs/releases/download/v$VERSION/phantomjs-$VERSION-linux-x86_64.tar.bz2 && \
9+
mkdir phantomjs && \
10+
tar xvjf phantomjs.tar.bz2 -C ./phantomjs --strip-components=1 && \
11+
mv phantomjs /usr/local/share && \
12+
ln -sf /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin && \
13+
rm -rf ./phantomjs ./phantomjs.tar.bz2
414
ONBUILD USER root
515
ONBUILD ARG NODE_VERSION='4.8.4'
616
ONBUILD RUN bash ./scripts/onbuild-node.sh

0 commit comments

Comments
 (0)