mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-30 19:54:28 +01:00
As discussed in #2908, Ubuntu is used as a base for CCv0 for building umoci in the guest. Currently, CCv0 only works with initrd, so this only applies to initrd. Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
39 lines
855 B
Docker
39 lines
855 B
Docker
# Copyright (c) 2021 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
FROM ubuntu
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV INSTALL_IN_GOPATH=false
|
|
|
|
ADD install_yq.sh /usr/bin/install_yq.sh
|
|
|
|
|
|
# yq installer deps
|
|
RUN apt update && apt-get install -y curl sudo
|
|
|
|
# Install yq
|
|
RUN install_yq.sh
|
|
|
|
RUN curl -fsSL https://get.docker.com -o get-docker.sh
|
|
RUN sh get-docker.sh
|
|
|
|
ARG IMG_USER=kata-builder
|
|
ARG UID=1000
|
|
ARG GID=1000
|
|
RUN if [ ${IMG_USER} != "root" ]; then groupadd --gid=${GID} ${IMG_USER};fi
|
|
RUN if [ ${IMG_USER} != "root" ]; then adduser ${IMG_USER} --uid=${UID} --gid=${GID};fi
|
|
RUN sh -c "echo '${IMG_USER} ALL=NOPASSWD: ALL' >> /etc/sudoers"
|
|
|
|
#FIXME: gcc is required as agent is build out of a container build.
|
|
RUN apt-get update && \
|
|
apt install -y \
|
|
cpio \
|
|
gcc \
|
|
git \
|
|
make \
|
|
xz-utils
|
|
|
|
ENV USER ${IMG_USER}
|
|
USER ${UID}:${GID}
|