Skip to content

Commit

Permalink
centraldashboard: Update node and use latest-stable (kubeflow#6260)
Browse files Browse the repository at this point in the history
Change the tests to NOT fetch Chromium from the Edge branch, which is develop,
but instead use latest-stable. We saw that edge can have problems from times to
times.

In the same commit we also update the node version to fix CVEs with the current
v12.18.3 version that we had.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
  • Loading branch information
kimwnasptd authored Jan 3, 2022
1 parent 2f47bfa commit bedda47
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions components/centraldashboard/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Step 1: Builds and tests
FROM node:12.18.3-alpine AS build
FROM node:12.22.8-alpine AS build

ARG kubeflowversion
ARG commit
Expand All @@ -8,19 +8,20 @@ ENV BUILD_COMMIT=$commit
ENV CHROME_BIN=/usr/bin/chromium-browser
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

# Installs latest Chromium package and configures environment for testing
# Installs latest-stable Chromium package and configures environment for testing
RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
apk add --no-cache bash chromium@edge nss@edge \
freetype@edge \
harfbuzz@edge \
ttf-freefont@edge \
libstdc++@edge
echo @stable http://nl.alpinelinux.org/alpine/latest-stable/community >> /etc/apk/repositories && \
echo @stable http://nl.alpinelinux.org/alpine/latest-stable/main >> /etc/apk/repositories

RUN apk add --no-cache bash chromium@stable nss@stable \
freetype@stable \
harfbuzz@stable \
ttf-freefont@stable \
libstdc++@stable

RUN if [ "$(uname -m)" = "aarch64" ]; then \
apk update && apk upgrade && \
apk add --no-cache python2 make g++@edge; \
apk add --no-cache python2 make g++@stable; \
fi

COPY . /centraldashboard
Expand All @@ -39,7 +40,7 @@ RUN npm rebuild && \
npm prune --production

# Step 2: Packages assets for serving
FROM node:12.18.3-alpine AS serve
FROM node:12.22.8-alpine AS serve

ENV NODE_ENV=production
WORKDIR /app
Expand Down

0 comments on commit bedda47

Please sign in to comment.