From a0bde6d97b94ec3f28a8e2480a78d2ae237d7cc5 Mon Sep 17 00:00:00 2001 From: takahiro-yamada Date: Wed, 2 Oct 2024 07:06:45 +0000 Subject: [PATCH] Add 24.04 build and update some dependencies --- .github/workflows/main.yaml | 10 +++--- .github/workflows/update.yaml | 8 +++-- 24.04/BRANCH | 1 + 24.04/TAG | 1 + 24.04/TAG_MINIMAL | 1 + 24.04/ubuntu-debug/Dockerfile | 54 +++++++++++++++++++++++++++++++++ 24.04/ubuntu-dev/Dockerfile | 30 ++++++++++++++++++ 24.04/ubuntu-minimal/Dockerfile | 3 ++ 24.04/ubuntu/Dockerfile | 28 +++++++++++++++++ 9 files changed, 128 insertions(+), 8 deletions(-) create mode 100644 24.04/BRANCH create mode 100644 24.04/TAG create mode 100644 24.04/TAG_MINIMAL create mode 100644 24.04/ubuntu-debug/Dockerfile create mode 100644 24.04/ubuntu-dev/Dockerfile create mode 100644 24.04/ubuntu-minimal/Dockerfile create mode 100644 24.04/ubuntu/Dockerfile diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f1902c5..ceee7eb 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,14 +5,14 @@ on: branches: - 'main' env: - go-version: 1.21 + go-version: 1.23 jobs: build: name: Build images strategy: matrix: - ubuntu-version: ["20.04", "22.04"] - runs-on: ubuntu-22.04 + ubuntu-version: ["20.04", "22.04", "24.04"] + runs-on: ubuntu-24.04 defaults: run: working-directory: ${{ matrix.ubuntu-version }} @@ -25,7 +25,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - version: v0.11.2 + version: v0.17.1 - name: Login to container registry if: github.event_name != 'pull_request' run: echo ${{ secrets.QUAY_PASSWORD }} | docker login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io @@ -36,7 +36,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Setup golang - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: ${{ env.go-version }} - name: Install container-tag-exists diff --git a/.github/workflows/update.yaml b/.github/workflows/update.yaml index 740db41..6e70b2c 100644 --- a/.github/workflows/update.yaml +++ b/.github/workflows/update.yaml @@ -7,14 +7,14 @@ jobs: name: Update images env: GH_TOKEN: ${{ secrets.CYBOZU_NECO_PAT }} - UBUNTU_VERSION: "20.04 22.04" - runs-on: ubuntu-22.04 + UBUNTU_VERSION: "20.04 22.04 24.04" + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 with: - version: v0.11.2 + version: v0.17.1 - name: Check minimal image updates shell: bash -xe {0} run: | @@ -25,6 +25,8 @@ jobs: codename=focal elif [ "${version}" = "22.04" ]; then codename=jammy + elif [ "${version}" = "24.04" ]; then + codename=noble else echo "Unknown Ubuntu version: ${version}" exit 1 diff --git a/24.04/BRANCH b/24.04/BRANCH new file mode 100644 index 0000000..e191604 --- /dev/null +++ b/24.04/BRANCH @@ -0,0 +1 @@ +24.04 diff --git a/24.04/TAG b/24.04/TAG new file mode 100644 index 0000000..00df3bb --- /dev/null +++ b/24.04/TAG @@ -0,0 +1 @@ +24.04.20241002 diff --git a/24.04/TAG_MINIMAL b/24.04/TAG_MINIMAL new file mode 100644 index 0000000..578e630 --- /dev/null +++ b/24.04/TAG_MINIMAL @@ -0,0 +1 @@ +noble-20241002 diff --git a/24.04/ubuntu-debug/Dockerfile b/24.04/ubuntu-debug/Dockerfile new file mode 100644 index 0000000..bdbac31 --- /dev/null +++ b/24.04/ubuntu-debug/Dockerfile @@ -0,0 +1,54 @@ +ARG TAG + +FROM --platform=$BUILDPLATFORM ghcr.io/cybozu/golang:1.23-jammy AS builder + +WORKDIR /go/src/github.com/fullstorydev/grpcurl +ARG GRPCURL_VERSION=1.8.9 +RUN curl -fsSL -o grpcurl.tar.gz "https://github.com/fullstorydev/grpcurl/archive/v${GRPCURL_VERSION}.tar.gz" \ + && tar -x -z --strip-components 1 -f grpcurl.tar.gz \ + && rm -f grpcurl.tar.gz \ + && GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -ldflags "-X \"main.version=${GRPCURL_VERSION}\"" -o /go/bin/grpcurl ./cmd/grpcurl + +FROM ghcr.io/cybozu/ubuntu:${TAG} + +RUN apt-get update && apt-get install -y --no-install-recommends \ + apache2-utils \ + awscli \ + bash-completion \ + bind9-dnsutils \ + binutils \ + bsdmainutils \ + expect \ + file \ + gdb \ + iproute2 \ + iputils-ping \ + jq \ + less \ + lv \ + mysql-client \ + net-tools \ + openssh-client \ + perl-modules \ + rclone \ + rsync \ + s3cmd \ + smartmontools \ + socat \ + sqlite3 \ + strace \ + sysstat \ + tcpdump \ + telnet \ + traceroute \ + vim \ + && rm -rf /var/lib/apt/lists/* + +RUN setcap -r /usr/bin/ping + +COPY --from=builder /go/bin/grpcurl /usr/local/bin +COPY --from=builder /go/src/github.com/fullstorydev/grpcurl/LICENSE /usr/local/grpcurl/LICENSE + +RUN adduser --disabled-password --gecos "" --uid 10000 cybozu + +CMD ["/bin/bash"] diff --git a/24.04/ubuntu-dev/Dockerfile b/24.04/ubuntu-dev/Dockerfile new file mode 100644 index 0000000..c3a6141 --- /dev/null +++ b/24.04/ubuntu-dev/Dockerfile @@ -0,0 +1,30 @@ +ARG TAG + +FROM ghcr.io/cybozu/ubuntu:${TAG} + +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + git \ + jq \ + libreadline-dev \ + libssl-dev \ + openssh-client \ + && rm -rf /var/lib/apt/lists/* + +ARG TARGETARCH +ARG HUB_VERSION=2.14.2 +ARG GH_VERSION=2.14.3 +RUN curl -fsL -o /tmp/hub.tgz https://github.com/github/hub/releases/download/v${HUB_VERSION}/hub-linux-${TARGETARCH}-${HUB_VERSION}.tgz \ + && tar -C /tmp -xzf /tmp/hub.tgz \ + && /tmp/hub-linux-${TARGETARCH}-${HUB_VERSION}/install \ + && mkdir -p /usr/share/doc/hub \ + && cp /tmp/hub-linux-${TARGETARCH}-${HUB_VERSION}/LICENSE /usr/share/doc/hub/LICENSE \ + && rm -rf /tmp/hub-linux-${TARGETARCH}-${HUB_VERSION} /tmp/hub.tgz \ + && curl -fsL -o /tmp/gh.tgz https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${TARGETARCH}.tar.gz \ + && tar -C /tmp -xzf /tmp/gh.tgz \ + && cp /tmp/gh_${GH_VERSION}_linux_${TARGETARCH}/bin/gh /usr/local/bin \ + && mkdir -p /usr/share/doc/gh \ + && cp /tmp/gh_${GH_VERSION}_linux_${TARGETARCH}/LICENSE /usr/share/doc/gh/LICENSE \ + && rm -rf /tmp/gh_${GH_VERSION}_linux_${TARGETARCH} /tmp/gh.tgz + +CMD ["/bin/bash"] diff --git a/24.04/ubuntu-minimal/Dockerfile b/24.04/ubuntu-minimal/Dockerfile new file mode 100644 index 0000000..04cbd66 --- /dev/null +++ b/24.04/ubuntu-minimal/Dockerfile @@ -0,0 +1,3 @@ +ARG TAG_MINIMAL + +FROM ubuntu:${TAG_MINIMAL} diff --git a/24.04/ubuntu/Dockerfile b/24.04/ubuntu/Dockerfile new file mode 100644 index 0000000..4fbb5dd --- /dev/null +++ b/24.04/ubuntu/Dockerfile @@ -0,0 +1,28 @@ +ARG TAG_MINIMAL + +FROM registry.k8s.io/pause:3.10 + +FROM ghcr.io/cybozu/ubuntu-minimal:${TAG_MINIMAL} + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + apt-transport-https \ + apt-utils \ + ca-certificates \ + curl \ + libreadline8 \ + locales \ + netbase \ + openssl \ + tzdata \ + && apt-get -y upgrade \ + && rm -rf /var/lib/apt/lists/* + +RUN locale-gen en_US.UTF-8 \ + && update-locale LANG=en_US.UTF-8 \ + && echo "Etc/UTC" > /etc/timezone \ + && dpkg-reconfigure -f noninteractive tzdata + +COPY --from=0 /pause /usr/local/bin/pause + +CMD ["/bin/bash"]