From f3cf8cb28f2573acb919ab8aa820eb4ca4000ad9 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sat, 7 Oct 2023 03:03:40 +0200 Subject: [PATCH] update Dockerfile: - re-order images/copy-jobs --- linux/ubuntu/Dockerfile | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/linux/ubuntu/Dockerfile b/linux/ubuntu/Dockerfile index b2c7ac0..35459a6 100644 --- a/linux/ubuntu/Dockerfile +++ b/linux/ubuntu/Dockerfile @@ -6,16 +6,6 @@ ARG FROM_VERSION_MINOR=04 ARG FROM_VERSION=${FROM_VERSION_MAJOR}.${FROM_VERSION_MINOR} FROM ${FROM_IMAGE}:${FROM_VERSION} as base -FROM base as bicep -ARG TARGETARCH -ARG BICEP_VERSION=v0.21.1 -RUN export targetarch="${TARGETARCH}" \ - && if [ "${targetarch}" = "amd64" ]; then export targetarch="x64"; fi \ - && curl -sSLo bicep "https://github.com/Azure/bicep/releases/download/${BICEP_VERSION}/bicep-linux-${targetarch}" \ - && chmod +x ./bicep \ - && mv ./bicep /usr/local/bin/bicep \ - && bicep --version - FROM base as golang ARG TARGETARCH SHELL [ "/bin/bash", "--login", "-e", "-o", "pipefail", "-c" ] @@ -42,6 +32,16 @@ RUN curl -fsSL https://get.pulumi.com \ && export PATH="$HOME/.pulumi/bin:$PATH" \ && pulumi version +FROM base as bicep +ARG TARGETARCH +ARG BICEP_VERSION=v0.21.1 +RUN export targetarch="${TARGETARCH}" \ + && if [ "${targetarch}" = "amd64" ]; then export targetarch="x64"; fi \ + && curl -sSLo bicep "https://github.com/Azure/bicep/releases/download/${BICEP_VERSION}/bicep-linux-${targetarch}" \ + && chmod +x ./bicep \ + && mv ./bicep /usr/local/bin/bicep \ + && bicep --version + FROM base as act-base # automatic buildx ARGs @@ -304,14 +304,6 @@ ARG TARGETARCH SHELL [ "/bin/bash", "--login", "-e", "-o", "pipefail", "-c" ] WORKDIR /tmp -# add PowerShell -ARG TOOL_PATH_PWSH=/usr/share/powershell -COPY --from=powershell ${TOOL_PATH_PWSH} ${TOOL_PATH_PWSH} -RUN ln -s "${TOOL_PATH_PWSH}/pwsh" /usr/local/bin/pwsh - -# add PowerShell-modules -COPY --from=powershell-modules /usr/local/share/powershell /usr/local/share/powershell - # add go COPY --from=golang /usr/local/go /usr/local/go ENV PATH=/usr/local/go/bin:${PATH} @@ -323,6 +315,14 @@ COPY --from=pulumi /root/.pulumi/bin /usr/local/bin/ # add bicep COPY --from=bicep /usr/local/bin/bicep /usr/local/bin/bicep +# add PowerShell +ARG TOOL_PATH_PWSH=/usr/share/powershell +COPY --from=powershell ${TOOL_PATH_PWSH} ${TOOL_PATH_PWSH} +RUN ln -s "${TOOL_PATH_PWSH}/pwsh" /usr/local/bin/pwsh + +# add PowerShell-modules +COPY --from=powershell-modules /usr/local/share/powershell /usr/local/share/powershell + ARG RUNNER USER ${RUNNER}