From 152e42fd30d2fb8b7fff58cb2f2434aa4235a4db Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Fri, 26 Jul 2024 00:17:54 +0200 Subject: [PATCH] fix: :green_heart: Move git commit env var in last step of Dockerfile to avoid it being removed --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0a4316ad..6db7f55d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,10 +20,6 @@ COPY . /temp # Copy dependencies COPY --from=install /temp/node_modules /temp/node_modules -# Set current Git commit hash as an environment variable -ARG GIT_COMMIT -ENV GIT_COMMIT=$GIT_COMMIT - # Build the project WORKDIR /temp RUN bun run build @@ -46,6 +42,10 @@ LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" LABEL org.opencontainers.image.title="Lysand Server" LABEL org.opencontainers.image.description="Lysand Server docker image" +# Set current Git commit hash as an environment variable +ARG GIT_COMMIT +ENV GIT_COMMIT=$GIT_COMMIT + # CD to app WORKDIR /app ENV NODE_ENV=production