diff --git a/.github/workflows/gen-repository-iso.yaml b/.github/workflows/gen-repository-iso.yaml index d100f3d89..6358b6723 100644 --- a/.github/workflows/gen-repository-iso.yaml +++ b/.github/workflows/gen-repository-iso.yaml @@ -26,6 +26,8 @@ jobs: dockerfile: dockerfile.ubuntu1804 - name: ubuntu-20.04-debs dockerfile: dockerfile.ubuntu2004 + - name: ubuntu-22.04-debs + dockerfile: dockerfile.ubuntu2204 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/Makefile b/Makefile index e4b2c53d2..fba6d1e0f 100644 --- a/Makefile +++ b/Makefile @@ -262,7 +262,7 @@ go-releaser-test: ISO_ARCH ?= amd64 ISO_OUTPUT_DIR ?= ./output ISO_BUILD_WORKDIR := hack/gen-repository-iso -ISO_OS_NAMES := centos7 debian9 debian10 ubuntu1604 ubuntu1804 ubuntu2004 +ISO_OS_NAMES := centos7 debian9 debian10 ubuntu1604 ubuntu1804 ubuntu2004 ubuntu2204 ISO_BUILD_NAMES := $(addprefix build-iso-,$(ISO_OS_NAMES)) build-iso-all: $(ISO_BUILD_NAMES) .PHONY: $(ISO_BUILD_NAMES) diff --git a/hack/gen-repository-iso/dockerfile.ubuntu2204 b/hack/gen-repository-iso/dockerfile.ubuntu2204 new file mode 100644 index 000000000..7a92912a6 --- /dev/null +++ b/hack/gen-repository-iso/dockerfile.ubuntu2204 @@ -0,0 +1,33 @@ +FROM ubuntu:22.04 as ubuntu2204 +ARG TARGETARCH +ARG OS_RELEASE=jammy +ARG DIR=ubuntu-22.04-${TARGETARCH}-debs +ARG PKGS=.common[],.debs[],.ubuntu[],.ubuntu2204[] +ARG BUILD_TOOLS="apt-transport-https software-properties-common ca-certificates curl wget gnupg dpkg-dev genisoimage" +ENV DEBIAN_FRONTEND=noninteractive + +# dump system package list +RUN dpkg --get-selections | grep -v deinstall | cut -f1 | cut -d ':' -f1 > packages.list +RUN apt update -qq \ + && apt install -y --no-install-recommends $BUILD_TOOLS \ + #&& add-apt-repository ppa:gluster/glusterfs-7 -y \ + && curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - \ + && echo "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu ${OS_RELEASE} stable" > /etc/apt/sources.list.d/docker.list\ + && apt update -qq + +WORKDIR /package +COPY packages.yaml . + +COPY --from=mikefarah/yq:4.11.1 /usr/bin/yq /usr/bin/yq +RUN yq eval "${PKGS}" packages.yaml >> packages.list \ + && sort -u packages.list | xargs apt-get install --yes --reinstall --print-uris | awk -F "'" '{print $2}' | grep -v '^$' | sort -u > packages.urls + +RUN mkdir -p ${DIR} \ + && wget -q -x -P ${DIR} -i packages.urls \ + && cd ${DIR} \ + && dpkg-scanpackages ./ /dev/null | gzip -9c > ./Packages.gz + +RUN genisoimage -r -o ${DIR}.iso ${DIR} + +FROM scratch +COPY --from=ubuntu2204 /package/*.iso / diff --git a/hack/gen-repository-iso/packages.yaml b/hack/gen-repository-iso/packages.yaml index 0934486b5..aa192321e 100644 --- a/hack/gen-repository-iso/packages.yaml +++ b/hack/gen-repository-iso/packages.yaml @@ -51,25 +51,31 @@ centos7: debian: - containerd.io +# The latest version of docker-ce on debian 9 is 19.03.15 debian9: - docker-ce=5:19.03.15~3-0~debian-stretch - docker-ce-cli=5:19.03.15~3-0~debian-stretch debian10: - - docker-ce=5:20.10.7~3-0~debian-buster - - docker-ce-cli=5:20.10.7~3-0~debian-buster + - docker-ce=5:20.10.8~3-0~debian-buster + - docker-ce-cli=5:20.10.8~3-0~debian-buster ubuntu: - containerd.io ubuntu1604: - - docker-ce=5:20.10.7~3-0~ubuntu-xenial - - docker-ce-cli=5:20.10.7~3-0~ubuntu-xenial + - docker-ce=5:20.10.8~3-0~ubuntu-xenial + - docker-ce-cli=5:20.10.8~3-0~ubuntu-xenial ubuntu1804: - docker-ce=5:20.10.8~3-0~ubuntu-bionic - - docker-ce-cli=5:20.10.7~3-0~ubuntu-bionic + - docker-ce-cli=5:20.10.8~3-0~ubuntu-bionic ubuntu2004: - docker-ce=5:20.10.8~3-0~ubuntu-focal - - docker-ce-cli=5:20.10.7~3-0~ubuntu-focal + - docker-ce-cli=5:20.10.8~3-0~ubuntu-focal + +# The minimum version of docker-ce on ubuntu 2204 is 20.10.13 +ubuntu2204: + - docker-ce=5:20.10.13~3-0~ubuntu-jammy + - docker-ce-cli=5:20.10.13~3-0~ubuntu-jammy