Newer
Older
ARG BASE_IMAGE
FROM $BASE_IMAGE
ARG OPENTOFU_VERSION
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
RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh -o install-opentofu.sh && \
chmod +x install-opentofu.sh && \
OPENTOFU_VERSION=${OPENTOFU_VERSION} ./install-opentofu.sh --install-method standalone && \
rm ./install-opentofu.sh && \
tofu --version
WORKDIR /
COPY assets/gitlab-opentofu.sh /usr/bin/gitlab-opentofu
RUN chmod +x /usr/bin/gitlab-opentofu
# Override ENTRYPOINT
ENTRYPOINT []