Skip to content

Commit

Permalink
update Dockerfile:
Browse files Browse the repository at this point in the history
- re-order images/copy-jobs
  • Loading branch information
mauwii committed Oct 7, 2023
1 parent a5ccf0e commit f3cf8cb
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions linux/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand All @@ -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
Expand Down Expand Up @@ -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}
Expand All @@ -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}

Expand Down

0 comments on commit f3cf8cb

Please sign in to comment.