This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,21 @@ COPY . /app
24
24
# Build the webapp
25
25
FROM node:23-slim AS webbuilder
26
26
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
+
27
30
# Install curl for downloading the webapp from GH and unzip to extract it
28
31
RUN apt-get update && apt-get install -y --no-install-recommends \
29
32
curl \
33
+ jq \
30
34
unzip\
31
35
ca-certificates
32
36
33
37
WORKDIR /usr/src/
34
38
35
- # To ensure we always download the latest release of the webapp, we use a build argument.
36
- # This prevents the curl command from being cached by Docker.
37
-
38
- ARG LATEST_RELEASE=LATEST
39
- RUN echo "Latest FE release: $LATEST_RELEASE"
40
- RUN LATEST_RELEASE=${LATEST_RELEASE} curl -L -o main.zip ${LATEST_RELEASE}
39
+ # Download the latest release of the webapp
40
+ RUN echo "Latest FE release: $(curl -s ${LATEST_RELEASE} | jq -r '.tag_name')"
41
+ RUN curl -s ${LATEST_RELEASE} | jq -r '.zipball_url' | xargs curl -L -o main.zip
41
42
42
43
# Extract the downloaded zip file
43
44
RUN unzip main.zip
@@ -111,4 +112,4 @@ USER codegate
111
112
112
113
# Set the container's default entrypoint
113
114
EXPOSE 8989
114
- ENTRYPOINT ["/app/scripts/entrypoint.sh" ]
115
+ ENTRYPOINT ["/app/scripts/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments