Skip to content

Commit

Permalink
Use newer npm version in Docker UI build (#17064)
Browse files Browse the repository at this point in the history
  • Loading branch information
desertaxle authored Feb 9, 2025
1 parent c8986ed commit 332413a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/docker-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ github.event_name == 'release' && github.event.release.prerelease && 'pre-release' || github.event_name == 'release' && 'prod' || 'dev' }}
strategy:
fail-fast: false
matrix:
flavor:
- ""
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/time-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
with:
fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -42,7 +45,11 @@ jobs:
id: base_build_time
run: |
start_time=$(date +%s)
DOCKER_BUILDKIT=1 docker build . --no-cache --progress=plain
docker buildx build \
--platform linux/amd64,linux/arm64 \
--no-cache \
--progress=plain \
.
end_time=$(date +%s)
base_time=$((end_time - start_time))
echo "base_time=$base_time" >> $GITHUB_OUTPUT
Expand All @@ -65,7 +72,11 @@ jobs:
id: build_time
run: |
start_time=$(date +%s)
DOCKER_BUILDKIT=1 docker build . --no-cache --progress=plain
docker buildx build \
--platform linux/amd64,linux/arm64 \
--no-cache \
--progress=plain \
.
end_time=$(date +%s)
build_time=$((end_time - start_time))
echo "build_time=$build_time" >> $GITHUB_OUTPUT
Expand Down
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ARG NODE_VERSION=18.18.0
ARG EXTRA_PIP_PACKAGES=""

# Build the UI distributable.
FROM node:${NODE_VERSION}-bullseye-slim AS ui-builder
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-bullseye-slim AS ui-builder

WORKDIR /opt/ui

Expand All @@ -24,9 +24,6 @@ RUN apt-get update && \
chromium \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

# Install a newer npm to avoid esbuild errors
RUN npm install -g npm@8

# Install dependencies separately so they cache
COPY ./ui/package*.json ./
RUN npm ci
Expand Down

0 comments on commit 332413a

Please sign in to comment.