Skip to content
Dockerfile 795 B
Newer Older
ARG BASE_IMAGE

FROM $BASE_IMAGE

RUN apk add --no-cache \
  curl \
  gcompat \
  git \
  idn2-utils \
  jq \
  openssh \
  cosign

# Install OpenTofu using the installer script in standalone mode
# see https://opentofu.org/docs/intro/install/standalone
# We may want to switch to installing manually from GitHub and verifying signature
Timo Furrer's avatar
Timo Furrer committed
ARG OPENTOFU_VERSION
RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh && \
    chmod +x install-opentofu.sh && \
Timo Furrer's avatar
Timo Furrer committed
    ./install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}" && \
    rm ./install-opentofu.sh && \
    tofu --version

WORKDIR /

Timo Furrer's avatar
Timo Furrer committed
COPY assets/gitlab-tofu.sh /usr/bin/gitlab-tofu
RUN chmod +x /usr/bin/gitlab-tofu

# Override ENTRYPOINT
ENTRYPOINT []