Skip to content

Commit

Permalink
kicbase: update base image to 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
spowelljr committed Apr 13, 2023
1 parent 484eb7b commit b4f16c8
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions deploy/kicbase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ ENV GOARCH=${TARGETARCH}
ARG PREBUILT_AUTO_PAUSE
RUN if [ "$PREBUILT_AUTO_PAUSE" != "true" ]; then cd ./cmd/auto-pause/ && go build -o auto-pause-${TARGETARCH}; fi

# start from ubuntu 20.04, this image is reasonably small as a starting point
# start from ubuntu 22.04, this image is reasonably small as a starting point
# for a kubernetes node image, it doesn't contain much we don't need
FROM ubuntu:focal-20230308 as kicbase
FROM ubuntu:jammy-20230308 as kicbase

ARG BUILDKIT_VERSION="v0.11.4"
ARG FUSE_OVERLAYFS_VERSION="v1.7.1"
Expand Down Expand Up @@ -144,7 +144,7 @@ RUN clean-install \
# install docker
# use the bionic packages for arm32
RUN export ARCH=$(dpkg --print-architecture | sed 's/armhf/arm-v7/') && \
if [ "$ARCH" == "arm-v7" ]; then export DIST="bionic"; else export DIST="focal"; fi && \
if [ "$ARCH" == "arm-v7" ]; then export DIST="bionic"; else export DIST="jammy"; fi && \
sh -c "echo 'deb https://download.docker.com/linux/ubuntu ${DIST} stable' > /etc/apt/sources.list.d/docker.list" && \
curl -L https://download.docker.com/linux/ubuntu/gpg -o docker.key && \
apt-key add - < docker.key && \
Expand All @@ -169,30 +169,27 @@ RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/
&& chmod 755 /usr/local/bin/buildkitd \
&& systemctl enable buildkit.socket

# Install cri-o/podman dependencies:
# install cri-o dependencies:
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/') && \
sh -c "echo 'deb https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \
curl -LO https://downloadcontent.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \
sh -c "echo 'deb https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \
curl -LO https://downloadcontent.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_22.04/Release.key && \
apt-key add - < Release.key && \
if [ "$ARCH" != "ppc64le" ]; then \
clean-install containers-common catatonit conmon containernetworking-plugins cri-tools podman-plugins crun; \
clean-install catatonit conmon containernetworking-plugins cri-tools crun; \
else \
clean-install containers-common conmon containernetworking-plugins crun; \
clean-install conmon containernetworking-plugins crun; \
fi

# install cri-o based on https://github.com/cri-o/cri-o/blob/release-1.24/README.md#installing-cri-o
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/' | sed 's/armhf/arm-v7/') && \
if [ "$ARCH" != "ppc64le" ] && [ "$ARCH" != "arm-v7" ]; then sh -c "echo 'deb https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${CRIO_VERSION}/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:${CRIO_VERSION}.list" && \
curl -LO https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${CRIO_VERSION}/xUbuntu_20.04/Release.key && \
if [ "$ARCH" != "ppc64le" ] && [ "$ARCH" != "arm-v7" ]; then sh -c "echo 'deb https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${CRIO_VERSION}/xUbuntu_22.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:${CRIO_VERSION}.list" && \
curl -LO https://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/${CRIO_VERSION}/xUbuntu_22.04/Release.key && \
apt-key add - < Release.key && \
clean-install cri-o cri-o-runc; fi

# install podman
RUN export ARCH=$(dpkg --print-architecture | sed 's/ppc64el/ppc64le/') && \
if [ "$ARCH" != "ppc64le" ]; then sh -c "echo 'deb http://downloadcontent.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" && \
curl -LO https://downloadcontent.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_20.04/Release.key && \
apt-key add - < Release.key && \
clean-install podman && \
if [ "$ARCH" != "ppc64le" ]; then clean-install podman && \
addgroup --system podman && \
mkdir -p /etc/systemd/system/podman.socket.d && \
printf "[Socket]\nSocketMode=0660\nSocketUser=root\nSocketGroup=podman\n" \
Expand Down

0 comments on commit b4f16c8

Please sign in to comment.