From f5cf8667a5f12d5d6559ab669d690082f1ef72bb Mon Sep 17 00:00:00 2001 From: Patrick Baber Date: Mon, 27 Mar 2023 15:05:31 +0200 Subject: [PATCH] add regctl --- Dockerfile | 9 +++++++++ README.md | 1 + 2 files changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 04be9a0..52475ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ FROM docker:20.10-cli LABEL maintainer="Patrick Baber " +ENV REGCLIENT_VERSION "0.4.7" + +ARG TARGETARCH + # Install essentials RUN apk add --no-cache \ bash \ @@ -15,6 +19,11 @@ RUN apk add --no-cache \ unzip \ wget +# Install regctl +RUN if [ "$TARGETARCH" = "arm64" ]; then ARCHITECTURE="linux-arm64"; else ARCHITECTURE="linux-amd64"; fi && \ + curl -o /usr/local/bin/regctl https://github.com/regclient/regclient/releases/download/v${REGCLIENT_VERSION}/regctl-${ARCHITECTURE} && \ + chmod +x /usr/local/bin/regctl + # Install Trivy COPY --from=aquasec/trivy:0.35.0 /usr/local/bin/trivy /usr/local/bin/trivy RUN chmod +x /usr/local/bin/trivy diff --git a/README.md b/README.md index e25799c..7599da8 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Docker image with useful CI/CD tools - Docker Compose - git - openssl +- regctl - rsync - sshpass - trivy