Files
kata-containers/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in
stevenhorsman e777860a0c osbuilder: Make skopeo version externalised
- Remove the hardcoded skopeo version arg
- Switch to read from version.yaml and pass via --build-arg

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2023-01-25 11:37:56 +00:00

54 lines
1.6 KiB
Docker

# Copyright (c) 2018 Yash Jain, 2022 IBM Corp.
#
# SPDX-License-Identifier: Apache-2.0
ARG IMAGE_REGISTRY=docker.io
# Install skopeo which is not included in 20.04 release
# This can be removed when we upgrade the base to 22.04 release
FROM ${IMAGE_REGISTRY}/golang:1.18 AS skopeo
@SET_PROXY@
WORKDIR /skopeo
ARG SKOPEO_VERSION
RUN curl -fsSL "https://github.com/containers/skopeo/archive/v${SKOPEO_VERSION}.tar.gz" \
| tar -xzf - --strip-components=1
RUN CGO_ENABLED=0 DISABLE_DOCS=1 make BUILDTAGS=containers_image_openpgp GO_DYN_FLAGS=
FROM ${IMAGE_REGISTRY}/ubuntu:@OS_VERSION@
@SET_PROXY@
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get --no-install-recommends -y install \
ca-certificates \
curl \
g++ \
$(gcc_arch="@ARCH@" && [ "$(uname -m)" != "$gcc_arch" ] && ( \
libc_arch="$gcc_arch" && \
[ "$gcc_arch" = aarch64 ] && libc_arch=arm64; \
[ "$gcc_arch" = ppc64le ] && gcc_arch=powerpc64le && libc_arch=ppc64el; \
[ "$gcc_arch" = x86_64 ] && gcc_arch=x86-64 && libc_arch=amd64; \
echo "gcc-$gcc_arch-linux-gnu libc6-dev-$libc_arch-cross")) \
git \
golang-go \
libdevmapper-dev \
libgpgme-dev \
libssl-dev \
make \
multistrap \
musl-tools \
pkg-config \
protobuf-compiler \
gettext-base \
umoci \
kmod
# aarch64 requires this name -- link for all
RUN ln -s /usr/bin/musl-gcc "/usr/bin/$(uname -m)-linux-musl-gcc"
COPY --from=skopeo /skopeo/bin/skopeo /usr/local/bin/
COPY --from=skopeo /skopeo/default-policy.json /etc/containers/policy.json
@INSTALL_RUST@
@INSTALL_AA_KBC@