Skip to content

Commit cc0719f

Browse files
Removing layers to compress docker container size
with @painchaudAlexandre we just remove some layer from our container to compress the container size
1 parent 68e0153 commit cc0719f

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

Dockerfile

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
FROM node:14-alpine
22

33
# last commit=v1.12.0
4-
ENV VERSION=develop
4+
ENV VERSION=develop
55
ENV CHROMIUM_VERSION 86.0.4240.111-r0
66

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} . \
10+
RUN apk upgrade --update && apk --no-cache add git gcc make g++ zlib-dev libjpeg-turbo-dev nasm \
11+
&& git clone https://github.com/gmetais/YellowLabTools.git -b ${VERSION} . \
1212
&& git checkout e9ab1fd \
13-
&& NODE_ENV=development && npm install --only=prod
14-
15-
16-
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories \
13+
&& NODE_ENV=development && npm install --only=prod \
14+
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositories \
1715
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
1816
&& echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
1917
&& echo "http://dl-cdn.alpinelinux.org/alpine/v3.12/main" >> /etc/apk/repositories \
@@ -26,19 +24,16 @@ RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" > /etc/apk/repositorie
2624
freetype-dev \
2725
harfbuzz \
2826
nss \
29-
ttf-freefont
30-
31-
27+
ttf-freefont \
28+
&& which chromium-browser && chromium-browser --no-sandbox --version && chown -R nobody:nogroup . \
29+
&& rm -rf test doc
3230

33-
RUN which chromium-browser
34-
RUN chromium-browser --no-sandbox --version
3531

3632

3733
# Tell Puppeteer to skip installing Chrome. We'll be using the installed binary
3834
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
3935

4036

41-
RUN chown -R nobody:nogroup .
4237

4338
# Run everything after as non-privileged user.
4439
USER nobody

0 commit comments

Comments
 (0)