Skip to content

Commit e44388e

Browse files
Merge pull request ousamabenyounes#20 from ousamabenyounes/main
Alexandre Painchaud Docker Optimizations
2 parents ed270da + 9325985 commit e44388e

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

Dockerfile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,33 @@ ENV CHROMIUM_VERSION 86.0.4240.111-r0
77

88
WORKDIR /usr/src/ylt
99

10-
RUN apk upgrade --update && apk --no-cache add git gcc make g++ zlib-dev libjpeg-turbo-dev nasm
11-
RUN git clone https://github.com/gmetais/YellowLabTools.git -b ${VERSION} . \
12-
&& git checkout e9ab1fd \
13-
&& NODE_ENV=development && npm install --only=prod
14-
15-
1610
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories \
1711
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
1812
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
1913
&& echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories \
2014
&& apk upgrade -U -a \
21-
&& apk add \
15+
&& apk --no-cache add git gcc make g++ zlib-dev libjpeg-turbo-dev nasm \
2216
libjpeg-turbo-dev \
2317
chromium \
2418
ca-certificates \
2519
freetype \
2620
freetype-dev \
2721
harfbuzz \
2822
nss \
29-
ttf-freefont
30-
31-
32-
33-
RUN which chromium-browser
34-
RUN chromium-browser --no-sandbox --version
23+
ttf-freefont \
24+
&& apk cache clean
25+
26+
RUN git clone https://github.com/gmetais/YellowLabTools.git -b ${VERSION} . \
27+
&& git checkout e9ab1fd \
28+
&& NODE_ENV=development && npm install --only=prod
3529

30+
RUN which chromium-browser \
31+
&& chromium-browser --no-sandbox --version \
32+
&& chown -R nobody:nogroup .
3633

3734
# Tell Puppeteer to skip installing Chrome. We'll be using the installed binary
3835
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
3936

40-
41-
RUN chown -R nobody:nogroup .
42-
4337
# Run everything after as non-privileged user.
4438
USER nobody
4539

0 commit comments

Comments
 (0)