Skip to content

Commit

Permalink
Fix release download
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehinds committed Jan 7, 2025
1 parent 3ad4566 commit b1eeed9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,20 @@ COPY . /app
# Build the webapp
FROM node:23-slim AS webbuilder



# Install curl for downloading the webapp from GH and unzip to extract it
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
jq \
unzip \
unzip\
ca-certificates

WORKDIR /usr/src/

# Ensure the LATEST_RELEASE argument is passed or set a default value
# Set the release URL (this should be static and not change often) and download latest
ARG LATEST_RELEASE="https://api.github.com/repos/stacklok/codegate-ui/releases/latest"
RUN echo "Latest FE release: $LATEST_RELEASE" \
&& TAG=$(curl -s $LATEST_RELEASE | jq -r '.tag_name') \
&& echo "Latest FE release: ${TAG}" \
&& ZIP_URL=$(curl -s $LATEST_RELEASE | jq -r '.zipball_url') \
&& curl -L -o main.zip $ZIP_URL
RUN curl -s ${LATEST_RELEASE} | jq -r '.zipball_url' | xargs curl -L -o main.zip

# Extract the downloaded zip file
RUN unzip main.zip
Expand Down

0 comments on commit b1eeed9

Please sign in to comment.