Skip to content
Snippets Groups Projects
Select Git revision
  • e529ec8768f0619fc106cda06df161fdb6e00861
  • main default protected
  • no-rules-in-job-templates
  • deploy-refactor
  • fix-readme-path
  • auto-apply-for-backports
  • destroy-pipeline
  • subdir
  • destroy-plan
  • 3.0.1
  • 3.0.0
  • 3.0.0-rc1
  • 2.13.0
  • 2.12.0
  • 2.11.0
  • 2.10.2
  • 2.10.2-rc1
  • 2.10.1
  • 2.10.1-rc1
  • 2.10.0
  • 2.9.0
  • 2.8.1
  • 2.8.0
  • 2.7.1
  • 2.7.1-rc1
  • 2.7.0
  • 2.6.1
  • 2.6.0
  • 2.6.0-rc1
29 results

Dockerfile.debian

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Dockerfile.debian 1.39 KiB
    ARG BASE_IMAGE=debian:12.7-slim
    
    FROM $BASE_IMAGE
    
    ARG TARGETARCH
    
    RUN apt-get update && apt-get install -y \
      curl \
      wget \
      git \
      jq \
      openssh-client \
      unzip \
      idn2 \
      && rm -rf /var/lib/apt/lists/*
    
    # NOTE: cosign is not yet available in the debian apt sources
    ARG COSIGN_VERSION=2.4.1
    WORKDIR /tmp
    RUN wget https://github.com/sigstore/cosign/releases/download/v${COSIGN_VERSION}/cosign_${COSIGN_VERSION}_${TARGETARCH}.deb && \
        dpkg -i *.deb && \
        rm -f /tmp/*.deb
    
    # NOTE: glab is not yet available in the debian apt sources
    ARG GLAB_VERSION=1.48.0
    WORKDIR /tmp
    RUN wget https://gitlab.com/gitlab-org/cli/-/releases/v${GLAB_VERSION}/downloads/glab_${GLAB_VERSION}_linux_${TARGETARCH}.deb && \
        dpkg -i *.deb && \
        rm -f /tmp/*.deb
    
    # 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
    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 && \
        ./install-opentofu.sh --install-method standalone --opentofu-version "${OPENTOFU_VERSION}" && \
        rm ./install-opentofu.sh && \
        rm -rf /tmp/* && \
        tofu --version
    
    WORKDIR /
    
    COPY --chmod=755 src/gitlab-tofu.sh /usr/bin/gitlab-tofu
    
    # Override ENTRYPOINT
    ENTRYPOINT []