Skip to content

Commit a0a47b4

Browse files
authored
Merge pull request #15 from AkihiroSuda/dev
Support Ubuntu 24.04
2 parents 3748a0d + 4ea49ce commit a0a47b4

File tree

6 files changed

+27
-23
lines changed

6 files changed

+27
-23
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
- "Dockerfile.debian-11"
4848
- "Dockerfile.debian-12"
4949
- "Dockerfile.ubuntu-2204"
50-
- "Dockerfile.ubuntu-2304"
50+
- "Dockerfile.ubuntu-2404"
5151
- "alternative/Dockerfile.debian-13"
52-
- "alternative/Dockerfile.ubuntu-2310"
52+
- "alternative/Dockerfile.ubuntu-2404"
5353
steps:
5454
- uses: actions/checkout@v4
5555
- uses: docker/setup-buildx-action@v2

Dockerfile.ubuntu-2304 renamed to Dockerfile.ubuntu-2404

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:lunar-20230816
1+
FROM ubuntu:noble-20240407.1
22
ENV DEBIAN_FRONTEND=noninteractive
33
RUN \
44
--mount=type=cache,target=/var/cache/apt,sharing=locked \

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Examples:
2020
- [`Dockerfile.debian-11`](./Dockerfile.debian-11)
2121
- [`Dockerfile.debian-12`](./Dockerfile.debian-12)
2222
- [`Dockerfile.ubuntu-2204`](./Dockerfile.ubuntu-2204)
23-
- [`Dockerfile.ubuntu-2304`](./Dockerfile.ubuntu-2304)
23+
- [`Dockerfile.ubuntu-2404`](./Dockerfile.ubuntu-2404)
2424
- [`Dockerfile.archlinux`](./Dockerfile.archlinux)
2525

2626
## Hints
@@ -42,12 +42,13 @@ Examples:
4242

4343
Distribution-specific default values:
4444

45-
| Distribution | `SOURCE_DATE_EPOCH` | `SNAPSHOT_ARCHIVE_BASE` |
46-
|----------------|-------------------------------------------------------|--------------------------------------------------|
47-
| Debian (<= 11) | Timestamp of `/etc/apt/sources.list` | `http://snapshot-cloudflare.debian.org/archive/` |
48-
| Debian (>= 12) | Timestamp of `/etc/apt/sources.list.d/debian.sources` | `http://snapshot-cloudflare.debian.org/archive/` |
49-
| Ubuntu | Timestamp of `/etc/apt/sources.list` | `http://snapshot.ubuntu.com/` |
50-
| ArchLinux | Timestamp of `/var/log/pacman.log` | `http://archive.archlinux.org/` |
45+
| Distribution | `SOURCE_DATE_EPOCH` | `SNAPSHOT_ARCHIVE_BASE` |
46+
|-------------------|-------------------------------------------------------|--------------------------------------------------|
47+
| Debian (<= 11) | Timestamp of `/etc/apt/sources.list` | `http://snapshot-cloudflare.debian.org/archive/` |
48+
| Debian (>= 12) | Timestamp of `/etc/apt/sources.list.d/debian.sources` | `http://snapshot-cloudflare.debian.org/archive/` |
49+
| Ubuntu (<= 23.10) | Timestamp of `/etc/apt/sources.list` | `http://snapshot.ubuntu.com/` |
50+
| Ubuntu (>= 24.04) | Timestamp of `/etc/apt/sources.list.d/ubuntu.sources` | `http://snapshot.ubuntu.com/` |
51+
| ArchLinux | Timestamp of `/var/log/pacman.log` | `http://archive.archlinux.org/` |
5152

5253

5354
## Related project

alternative/Dockerfile.debian-13

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN \
77
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list.d/debian.sources)}" && \
88
snapshot="$(/bin/bash -euc "printf \"%(%Y%m%dT%H%M%SZ)T\n\" \"${SOURCE_DATE_EPOCH}\"")" && \
99
: "Enabling snapshot" && \
10-
sed -i -e '/URIs: http:\/\/deb.debian.org\/debian/ a\Snapshot: true' /etc/apt/sources.list.d/debian.sources && \
10+
sed -i -e '/Types: deb/ a\Snapshot: true' /etc/apt/sources.list.d/debian.sources && \
1111
: "Enabling cache" && \
1212
rm -f /etc/apt/apt.conf.d/docker-clean && \
1313
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \

alternative/Dockerfile.ubuntu-2310 renamed to alternative/Dockerfile.ubuntu-2404

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Base image must be Ubuntu 23.10 (Mantic Minotaur) or later: https://salsa.debian.org/apt-team/apt/-/merge_requests/291
2-
FROM ubuntu:mantic-20230819
2+
FROM ubuntu:noble-20240407.1
33
ENV DEBIAN_FRONTEND=noninteractive
44
RUN \
55
--mount=type=cache,target=/var/cache/apt,sharing=locked \
66
--mount=type=cache,target=/var/lib/apt,sharing=locked \
7-
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list)}" && \
7+
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list.d/ubuntu.sources)}" && \
88
snapshot="$(/bin/bash -euc "printf \"%(%Y%m%dT%H%M%SZ)T\n\" \"${SOURCE_DATE_EPOCH}\"")" && \
99
: "Enabling snapshot" && \
10-
sed -i -e 's/^deb http/deb [snapshot=true] http/g' /etc/apt/sources.list && \
10+
sed -i -e '/Types: deb/ a\Snapshot: true' /etc/apt/sources.list.d/ubuntu.sources && \
1111
: "Enabling cache" && \
1212
rm -f /etc/apt/apt.conf.d/docker-clean && \
1313
echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' >/etc/apt/apt.conf.d/keep-cache && \

repro-sources-list.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# - debian:11 (/etc/apt/sources.list)
2525
# - debian:12 (/etc/apt/sources.list.d/debian.sources)
2626
# - ubuntu:22.04 (/etc/apt/sources.list)
27-
# - ubuntu:23.10 (/etc/apt/sources.list)
27+
# - ubuntu:24.04 (/etc/apt/sources.listd/ubuntu.sources)
2828
# - archlinux (/etc/pacman.d/mirrorlist)
2929
#
3030
# For the further information, see https://github.com/reproducible-containers/repro-sources-list.sh
@@ -46,15 +46,12 @@ case "${ID}" in
4646
# : "${SNAPSHOT_ARCHIVE_BASE:=http://snapshot.debian.org/archive/}"
4747
: "${SNAPSHOT_ARCHIVE_BASE:=http://snapshot-cloudflare.debian.org/archive/}"
4848
: "${BACKPORTS:=}"
49-
case "${VERSION_ID}" in
50-
"10" | "11")
51-
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list)}"
52-
;;
53-
*)
49+
if [ -e /etc/apt/sources.list.d/debian.sources ]; then
5450
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list.d/debian.sources)}"
5551
rm -f /etc/apt/sources.list.d/debian.sources
56-
;;
57-
esac
52+
else
53+
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list)}"
54+
fi
5855
snapshot="$(printf "%(%Y%m%dT%H%M%SZ)T\n" "${SOURCE_DATE_EPOCH}")"
5956
# TODO: use the new format for Debian >= 12
6057
echo "deb [check-valid-until=no] ${SNAPSHOT_ARCHIVE_BASE}debian/${snapshot} ${VERSION_CODENAME} main" >/etc/apt/sources.list
@@ -65,8 +62,14 @@ case "${ID}" in
6562
;;
6663
"ubuntu")
6764
: "${SNAPSHOT_ARCHIVE_BASE:=http://snapshot.ubuntu.com/}"
68-
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list)}"
65+
if [ -e /etc/apt/sources.list.d/ubuntu.sources ]; then
66+
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list.d/ubuntu.sources)}"
67+
rm -f /etc/apt/sources.list.d/ubuntu.sources
68+
else
69+
: "${SOURCE_DATE_EPOCH:=$(stat --format=%Y /etc/apt/sources.list)}"
70+
fi
6971
snapshot="$(printf "%(%Y%m%dT%H%M%SZ)T\n" "${SOURCE_DATE_EPOCH}")"
72+
# TODO: use the new format for Ubuntu >= 24.04
7073
echo "deb [check-valid-until=no] ${SNAPSHOT_ARCHIVE_BASE}ubuntu/${snapshot} ${VERSION_CODENAME} main restricted" >/etc/apt/sources.list
7174
echo "deb [check-valid-until=no] ${SNAPSHOT_ARCHIVE_BASE}ubuntu/${snapshot} ${VERSION_CODENAME}-updates main restricted" >>/etc/apt/sources.list
7275
echo "deb [check-valid-until=no] ${SNAPSHOT_ARCHIVE_BASE}ubuntu/${snapshot} ${VERSION_CODENAME} universe" >>/etc/apt/sources.list

0 commit comments

Comments
 (0)