Skip to content

Commit 4083e6f

Browse files
authored
[server, bridge] Switch base-images to node:18.20.7-alpine to avoid CVEs (#20692)
Tool: gitpod/catfood.gitpod.cloud
1 parent fd36244 commit 4083e6f

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

components/server/leeway.Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22
# Licensed under the GNU Affero General Public License (AGPL).
33
# See License.AGPL.txt in the project root for license information.
44

5-
FROM node:18.17.1-slim AS builder
5+
FROM node:18.20.7-alpine AS builder
66

77
# Install Python, make, gcc and g++ for node-gyp
8-
RUN apt-get update && \
9-
apt-get install -y python3 make gcc g++ && \
10-
apt-get clean && \
11-
rm -rf /var/lib/apt/lists/*
8+
RUN apk update && \
9+
apk add python3 make gcc g++ bash && \
10+
rm -rf /var/cache/apk/*
1211

1312
COPY components-server--app /installer/
1413

1514
WORKDIR /app
1615
RUN /installer/install.sh
1716

18-
FROM cgr.dev/chainguard/node:18.17.1@sha256:af073516c203b6bd0b55a77a806a0950b486f2e9ea7387a32b0f41ea72f20886
17+
FROM node:18.20.7-alpine
1918
ENV NODE_OPTIONS="--unhandled-rejections=warn --max_old_space_size=2048"
2019

2120
EXPOSE 3000

components/ws-manager-bridge/leeway.Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22
# Licensed under the GNU Affero General Public License (AGPL).
33
# See License.AGPL.txt in the project root for license information.
44

5-
FROM node:18.17.1-slim as builder
5+
FROM node:18.20.7-alpine AS builder
6+
7+
# Install bash for the installer script
8+
RUN apk update && \
9+
apk add bash && \
10+
rm -rf /var/cache/apk/*
11+
612
COPY components-ws-manager-bridge--app /installer/
713

814
WORKDIR /app
915
RUN /installer/install.sh
1016

11-
FROM cgr.dev/chainguard/node:18.17.1@sha256:af073516c203b6bd0b55a77a806a0950b486f2e9ea7387a32b0f41ea72f20886
17+
FROM node:18.20.7-alpine
1218
ENV NODE_OPTIONS=--unhandled-rejections=warn
1319
EXPOSE 3000
1420
COPY --from=builder --chown=node:node /app /app/

0 commit comments

Comments
 (0)