Skip to content

Commit 3dbc88a

Browse files
feat: ajout d'un mécanisme d'application des correctifs de sécurité Debian (#2314)
1 parent 7a619c4 commit 3dbc88a

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

Dockerfile

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,15 @@ RUN mkdir -p /app/shared/node_modules && mkdir -p /app/server/node_modules
3636
# Production image, copy all the files and run next
3737
FROM node:22.17-slim AS server
3838
WORKDIR /app
39-
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt/lists \
40-
apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
39+
40+
RUN --mount=type=cache,target=/var/cache/apt \
41+
--mount=type=cache,target=/var/lib/apt/lists \
42+
apt-get update \
43+
&& apt-get install -y curl debsecan \
44+
&& codename=$(sh -c '. /etc/os-release; echo $VERSION_CODENAME') \
45+
&& apt-get install $(debsecan --suite $codename --format packages --only-fixed) \
46+
&& apt-get purge -y debsecan \
47+
&& rm -rf /var/lib/apt/lists/*
4148

4249
ENV NODE_ENV=production
4350
ARG PUBLIC_VERSION
@@ -55,7 +62,6 @@ COPY ./server/static /app/server/static
5562
EXPOSE 5000
5663
WORKDIR /app/server
5764

58-
5965
##############################################################
6066
###################### UI ##########################
6167
##############################################################
@@ -89,6 +95,15 @@ RUN yarn --cwd ui build
8995
FROM node:22.17-slim AS ui
9096
WORKDIR /app
9197

98+
RUN --mount=type=cache,target=/var/cache/apt \
99+
--mount=type=cache,target=/var/lib/apt/lists \
100+
apt-get update \
101+
&& apt-get install -y debsecan \
102+
&& codename=$(sh -c '. /etc/os-release; echo $VERSION_CODENAME') \
103+
&& apt-get install $(debsecan --suite $codename --format packages --only-fixed) \
104+
&& apt-get purge -y debsecan \
105+
&& rm -rf /var/lib/apt/lists/*
106+
92107
ENV NODE_ENV=production
93108
# Uncomment the following line in case you want to disable telemetry during runtime.
94109
ENV NEXT_TELEMETRY_DISABLED=1

0 commit comments

Comments
 (0)