Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building ubuntu 22.04 repository iso #1309

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/gen-repository-iso.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
33 changes: 33 additions & 0 deletions hack/gen-repository-iso/dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
@@ -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 /
18 changes: 12 additions & 6 deletions hack/gen-repository-iso/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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