Skip to content
Snippets Groups Projects
Dockerfile 675 B
Newer Older
ARG BASE_IMAGE
FROM $BASE_IMAGE
ARG TARGETARCH

ARG TERRAFORM_BINARY_VERSION

RUN apk add --no-cache \
  curl \
  gcompat \
  git \
  idn2-utils \
  jq \
  openssh
RUN ( curl -sLo terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_BINARY_VERSION}/terraform_${TERRAFORM_BINARY_VERSION}_linux_${TARGETARCH}.zip" && \
      unzip terraform.zip && \
      rm terraform.zip && \
      mv ./terraform /usr/local/bin/terraform \
    ) && terraform --version

WORKDIR /
Matt Kasa's avatar
Matt Kasa committed

COPY src/bin/gitlab-terraform.sh /usr/bin/gitlab-terraform
RUN chmod +x /usr/bin/gitlab-terraform

Matt Kasa's avatar
Matt Kasa committed
# Override ENTRYPOINT since hashicorp/terraform uses `terraform`
ENTRYPOINT []