Skip to content

Commit

Permalink
test for ATMOS_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman committed Jun 25, 2024
1 parent b0add28 commit 8abf2b0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ARG BUILDPLATFORM
ARG ATMOS_VERSION

SHELL ["/bin/bash", "-c"]

# Check if ATMOS_VERSION is set
RUN if [ -z "$ATMOS_VERSION" ]; then echo "ERROR: ATMOS_VERSION argument must be set" && exit 1; fi

# Update the package list and install curl and git
RUN apt-get update && apt-get install -y curl git

Expand All @@ -32,5 +36,6 @@ RUN case ${TARGETPLATFORM} in \
*) echo "Unsupported platform: ${TARGETPLATFORM}" && exit 1 ;; \
esac && \
ATMOS_VERSION=${ATMOS_VERSION#v} && \
echo "Downloading Atmos v${ATMOS_VERSION} for ${OS}/${ARCH}" && \
curl -1sSLf "https://github.com/cloudposse/atmos/releases/download/v${ATMOS_VERSION}/atmos_${ATMOS_VERSION}_${OS}_${ARCH}" -o /usr/local/bin/atmos && \
chmod +x /usr/local/bin/atmos

0 comments on commit 8abf2b0

Please sign in to comment.