Files
kata-containers/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in
Alex Carter 59537ceb2d osbuilder: CC, add kmod to rootfs builder docker environment
To use depmod in the rootfs builder, the docker environment will require kmod.

Fixes: kata-containers#5125

Signed-Off-By: Alex Carter <alex.carter@ibm.com>
2022-09-16 10:13:10 -04: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="1.9.1"
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@