From 9986443830cbc4cb12e6fe31529c6a2708ebf07a Mon Sep 17 00:00:00 2001 From: Gapodo Date: Wed, 7 Dec 2022 23:11:11 +0100 Subject: [PATCH] retest --- Dockerfile.ci | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile.ci b/Dockerfile.ci index ad7073c243..6d00f947cf 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -2,17 +2,22 @@ FROM --platform=$BUILDPLATFORM golang:1.19 AS build-env ARG BUILDPLATFORM ARG GOPROXY -ENV GOPROXY ${GOPROXY:-direct} +ENV GOPROXY "${GOPROXY:-direct}" ARG TAG ENV TAG ${TAG:-main} ARG CI_COMMIT_SHA +ENV CI_COMMIT_SHA "${CI_COMMIT_SHA}" + ARG CI_REPO_CLONE_URL +ENV CI_REPO_CLONE_URL "${CI_REPO_CLONE_URL}" # Shorthands for easy use and ease of replacement ARG OUT "/out-bins" +ENV OUT "${OUT}" ARG DR "/docker/root" +ENV DR "${DR}" # Check vars and create directories RUN test -n "$CI_COMMIT_SHA" || (echo "CI_COMMIT_SHA is required but not set" >&2 && exit 1) && \ @@ -56,9 +61,6 @@ RUN echo "setting up git" && \ FROM alpine:3.17.0 LABEL maintainer="contact@forgejo.org" -ARG TARGETPLATFORM -ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} - EXPOSE 22 3000 RUN apk --no-cache add \ @@ -95,8 +97,13 @@ VOLUME ["/data"] ENTRYPOINT ["/usr/bin/entrypoint"] CMD ["/bin/s6-svscan", "/etc/s6"] +ARG TARGETPLATFORM +ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} + ARG OUT "/out-bins" +ENV OUT "${OUT}" ARG DR "/docker/root" +ENV DR "${DR}" COPY --from=build-env "${DR}" / COPY --from=build-env --chmod=755 "${OUT}/$TARGETPLATFORM/*" /app/gitea/