Skip to content

Commit

Permalink
Add 24.04 build and update some dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
takahiro-yamada committed Oct 2, 2024
1 parent 5884f89 commit a0bde6d
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions 24.04/BRANCH
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.04
1 change: 1 addition & 0 deletions 24.04/TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.04.20241002
1 change: 1 addition & 0 deletions 24.04/TAG_MINIMAL
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
noble-20241002
54 changes: 54 additions & 0 deletions 24.04/ubuntu-debug/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
30 changes: 30 additions & 0 deletions 24.04/ubuntu-dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions 24.04/ubuntu-minimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ARG TAG_MINIMAL

FROM ubuntu:${TAG_MINIMAL}
28 changes: 28 additions & 0 deletions 24.04/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit a0bde6d

Please sign in to comment.