Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 3ad4566

Browse files
committed
Fix release download
1 parent eec0e57 commit 3ad4566

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ COPY . /app
2424
# Build the webapp
2525
FROM node:23-slim AS webbuilder
2626

27-
# Set the release URL (this should be static and not change often)
28-
ARG LATEST_RELEASE=https://api.github.com/repos/stacklok/codegate-ui/releases/latest
29-
3027
# Install curl for downloading the webapp from GH and unzip to extract it
3128
RUN apt-get update && apt-get install -y --no-install-recommends \
3229
curl \
@@ -36,10 +33,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3633

3734
WORKDIR /usr/src/
3835

39-
# Download the latest release of the webapp in one single RUN instruction
40-
RUN TAG=$(curl -s ${LATEST_RELEASE} | jq -r '.tag_name') && \
41-
echo "Latest FE release: ${TAG}" && \
42-
curl -s ${LATEST_RELEASE} | jq -r '.zipball_url' | xargs curl -L -o main.zip
36+
# Ensure the LATEST_RELEASE argument is passed or set a default value
37+
ARG LATEST_RELEASE="https://api.github.com/repos/stacklok/codegate-ui/releases/latest"
38+
RUN echo "Latest FE release: $LATEST_RELEASE" \
39+
&& TAG=$(curl -s $LATEST_RELEASE | jq -r '.tag_name') \
40+
&& echo "Latest FE release: ${TAG}" \
41+
&& ZIP_URL=$(curl -s $LATEST_RELEASE | jq -r '.zipball_url') \
42+
&& curl -L -o main.zip $ZIP_URL
4343

4444
# Extract the downloaded zip file
4545
RUN unzip main.zip

0 commit comments

Comments
 (0)