Skip to content

Commit b9b694f

Browse files
authored
Merge pull request #473 from sir-gon/develop
[REFACTOR] [CONFIG] Dockerfile optimizations
2 parents 72ad1d5 + aec0c04 commit b9b694f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
###############################################################################
22
FROM node:22.8.0-alpine3.20 AS base
33

4-
RUN apk add --update --no-cache make
5-
RUN apk upgrade --update --no-cache openssl libcrypto3 libssl3 # FIX CVE-2024-5535
4+
RUN apk add --update --no-cache make \
5+
&& apk upgrade --update --no-cache openssl libcrypto3 libssl3 # FIX CVE-2024-5535
66

77
ENV WORKDIR=/app
88
WORKDIR ${WORKDIR}
@@ -13,10 +13,9 @@ FROM base AS lint
1313
ENV WORKDIR=/app
1414
WORKDIR ${WORKDIR}
1515

16-
RUN apk add --update --no-cache make nodejs npm
17-
RUN apk add --update --no-cache yamllint
18-
19-
RUN npm install -g --ignore-scripts markdownlint-cli
16+
RUN apk add --update --no-cache make nodejs npm \
17+
&& apk add --update --no-cache yamllint \
18+
&& npm install -g --ignore-scripts markdownlint-cli
2019

2120
# [!TIP] Use a bind-mount to "/app" to override following "copys"
2221
# for lint and test against "current" sources in this stage
@@ -124,8 +123,8 @@ COPY ./Makefile ${WORKDIR}/
124123
COPY ./package.json ${WORKDIR}/package.json
125124
COPY ./package-lock.json ${WORKDIR}/package-lock.json
126125

127-
RUN npm ci --verbose --omit=dev --omit=optional --ignore-scripts --no-cache
128-
RUN ls -alh
126+
RUN npm ci --verbose --omit=dev --omit=optional --ignore-scripts --no-cache \
127+
&& ls -alh
129128

130129
USER node
131130
CMD ["ls", "-alh"]

0 commit comments

Comments
 (0)