Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: (PSKD-881) Update Skopeo Installation #584

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ WORKDIR /build

RUN curl -sLO https://dl.k8s.io/release/v$kubectl_version/bin/linux/amd64/kubectl && chmod 755 ./kubectl

# Build Skopeo from source since the version in the apt repository is outdated
FROM golang:alpine3.20 AS golang
ARG SKOPEO_VERSION=release-1.16
RUN apk add --no-cache git build-base containers-common bash btrfs-progs-dev glib-dev go go-md2man gpgme-dev libselinux-dev linux-headers lvm2-dev ostree-dev \
&& git clone https://github.com/containers/skopeo.git -b $SKOPEO_VERSION \
&& DISABLE_DOCS=1 make -C skopeo bin/skopeo.linux.386

# Installation
FROM baseline
ARG helm_version=3.16.2
ARG aws_cli_version=2.17.58
ARG gcp_cli_version=496.0.0-0

# Add extra packages
RUN apt-get update && apt-get install --no-install-recommends -y gzip wget git jq ssh sshpass skopeo rsync \
RUN apt-get update && apt-get install --no-install-recommends -y gzip wget git jq ssh sshpass rsync \
&& rm -f /etc/ssh/ssh_host_rsa_key && rm -f /etc/ssh/ssh_host_ecdsa_key && rm -f /etc/ssh/ssh_host_ed25519_key \
&& curl -ksLO https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && chmod 755 get-helm-3 \
&& ./get-helm-3 --version v$helm_version --no-sudo \
Expand All @@ -41,6 +48,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y gzip wget git j
&& rm -rf /var/lib/apt/lists/*

COPY --from=tool_builder /build/kubectl /usr/local/bin/kubectl
COPY --from=golang /go/skopeo/bin/skopeo.linux.386 /usr/local/bin/skopeo

WORKDIR /viya4-deployment/
COPY . /viya4-deployment/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
# if the parsed creds contain symbols. This is expected and required to avoid Jinja2 templating issues.
- name: Orchestration tooling - Download orchestration tooling image
command: |
skopeo copy docker://{{ V4_CFG_CR_HOST }}/{{ ORCHESTRATION_IMAGE }} oci-archive:{{ ORCHESTRATION_TOOLING_ARCHIVE }} --src-creds {{ ORCHESTRATION_CR_USER | string }}:{{ ORCHESTRATION_CR_PASSWORD | string }}
skopeo copy docker://{{ V4_CFG_CR_HOST }}/{{ ORCHESTRATION_IMAGE }} oci-archive:{{ ORCHESTRATION_TOOLING_ARCHIVE }} --src-creds {{ ORCHESTRATION_CR_USER | string }}:{{ ORCHESTRATION_CR_PASSWORD | string }} --insecure-policy
dhoucgitter marked this conversation as resolved.
Show resolved Hide resolved
when:
- deployment_tooling == "docker"
tags:
Expand Down
Loading