Skip to content

Commit e275ce1

Browse files
authored
Add Ubuntu 24.04 to nightly-6.1 and nightly-main (#438)
1 parent 01bc0e2 commit e275ce1

File tree

4 files changed

+285
-0
lines changed

4 files changed

+285
-0
lines changed

nightly-6.1/ubuntu/24.04/Dockerfile

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
FROM ubuntu:24.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
binutils \
8+
git \
9+
unzip \
10+
gnupg2 \
11+
libc6-dev \
12+
libcurl4-openssl-dev \
13+
libedit2 \
14+
libgcc-13-dev \
15+
libpython3-dev \
16+
libsqlite3-0 \
17+
libstdc++-13-dev \
18+
libxml2-dev \
19+
libncurses-dev \
20+
libz3-dev \
21+
pkg-config \
22+
tzdata \
23+
zlib1g-dev \
24+
&& rm -r /var/lib/apt/lists/*
25+
26+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
27+
28+
# gpg --keyid-format LONG -k F167DF1ACF9CE069
29+
# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09]
30+
# E813C892820A6FA13755B268F167DF1ACF9CE069
31+
# uid [ unknown] Swift Automatic Signing Key #4 <[email protected]>
32+
ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069
33+
ARG SWIFT_PLATFORM=ubuntu
34+
ARG OS_MAJOR_VER=24
35+
ARG OS_MIN_VER=04
36+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.1-branch
37+
38+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
39+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
40+
OS_MAJOR_VER=$OS_MAJOR_VER \
41+
OS_MIN_VER=$OS_MIN_VER \
42+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
43+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
44+
45+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
46+
47+
RUN set -e; \
48+
# - Grab curl here so we cache better up above
49+
export DEBIAN_FRONTEND=noninteractive \
50+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
51+
# - Latest Toolchain info
52+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
53+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
54+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
55+
&& echo $DOWNLOAD_DIR > .swift_tag \
56+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
57+
&& export GNUPGHOME="$(mktemp -d)" \
58+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
59+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
60+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
61+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
62+
# - Unpack the toolchain, set libs permissions, and clean up.
63+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
64+
&& chmod -R o+r /usr/lib/swift \
65+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
66+
&& apt-get purge --auto-remove -y curl
67+
68+
# Print Installed Swift Version
69+
RUN swift --version
70+
71+
RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \
72+
( \
73+
printf "################################################################\n"; \
74+
printf "# %-60s #\n" ""; \
75+
printf "# %-60s #\n" "Swift Nightly Docker Image"; \
76+
printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \
77+
printf "# %-60s #\n" ""; \
78+
printf "################################################################\n" \
79+
) > /etc/motd
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM ubuntu:24.04
2+
3+
LABEL maintainer="Swift Infrastructure <[email protected]>"
4+
LABEL description="Docker Container for the Swift programming language"
5+
6+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
7+
apt-get -q install -y \
8+
libcurl4 \
9+
libxml2 \
10+
tzdata \
11+
&& rm -r /var/lib/apt/lists/*
12+
13+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
14+
15+
# gpg --keyid-format LONG -k F167DF1ACF9CE069
16+
# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09]
17+
# E813C892820A6FA13755B268F167DF1ACF9CE069
18+
# uid [ unknown] Swift Automatic Signing Key #4 <[email protected]>
19+
ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069
20+
ARG SWIFT_PLATFORM=ubuntu
21+
ARG OS_MAJOR_VER=24
22+
ARG OS_MIN_VER=04
23+
ARG SWIFT_WEBROOT=https://download.swift.org/swift-6.1-branch
24+
25+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
26+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
27+
OS_MAJOR_VER=$OS_MAJOR_VER \
28+
OS_MIN_VER=$OS_MIN_VER \
29+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
30+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
31+
32+
RUN set -e; \
33+
# - Grab curl and gpg here so we cache better up above
34+
export DEBIAN_FRONTEND=noninteractive \
35+
&& apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \
36+
# - Latest Toolchain info
37+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
38+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
39+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
40+
&& echo $DOWNLOAD_DIR > .swift_tag \
41+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
42+
&& export GNUPGHOME="$(mktemp -d)" \
43+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
44+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
45+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
46+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
47+
# - Unpack the toolchain, set libs permissions, and clean up.
48+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
49+
${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
50+
${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \
51+
&& chmod -R o+r /usr/lib/swift /usr/libexec/swift \
52+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
53+
&& apt-get purge --auto-remove -y curl gnupg
54+
55+
RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \
56+
( \
57+
printf "################################################################\n"; \
58+
printf "# %-60s #\n" ""; \
59+
printf "# %-60s #\n" "Swift Nightly Docker Image"; \
60+
printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \
61+
printf "# %-60s #\n" ""; \
62+
printf "################################################################\n" \
63+
) > /etc/motd

nightly-main/ubuntu/24.04/Dockerfile

+80
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
FROM ubuntu:24.04
2+
LABEL maintainer="Swift Infrastructure <[email protected]>"
3+
LABEL description="Docker Container for the Swift programming language"
4+
5+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
6+
apt-get -q install -y \
7+
binutils \
8+
git \
9+
unzip \
10+
gnupg2 \
11+
libc6-dev \
12+
libcurl4-openssl-dev \
13+
libedit2 \
14+
libgcc-13-dev \
15+
libpython3-dev \
16+
libsqlite3-0 \
17+
libstdc++-13-dev \
18+
libxml2-dev \
19+
libncurses-dev \
20+
libz3-dev \
21+
pkg-config \
22+
tzdata \
23+
zlib1g-dev \
24+
&& rm -r /var/lib/apt/lists/*
25+
26+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
27+
28+
# gpg --keyid-format LONG -k F167DF1ACF9CE069
29+
# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09]
30+
# E813C892820A6FA13755B268F167DF1ACF9CE069
31+
# uid [ unknown] Swift Automatic Signing Key #4 <[email protected]>
32+
ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069
33+
34+
ARG SWIFT_PLATFORM=ubuntu
35+
ARG OS_MAJOR_VER=24
36+
ARG OS_MIN_VER=04
37+
ARG SWIFT_WEBROOT=https://download.swift.org/development
38+
39+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
40+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
41+
OS_MAJOR_VER=$OS_MAJOR_VER \
42+
OS_MIN_VER=$OS_MIN_VER \
43+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
44+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
45+
46+
RUN echo "${SWIFT_WEBROOT}/latest-build.yml"
47+
48+
RUN set -e; \
49+
# - Grab curl here so we cache better up above
50+
export DEBIAN_FRONTEND=noninteractive \
51+
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \
52+
# - Latest Toolchain info
53+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
54+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
55+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
56+
&& echo $DOWNLOAD_DIR > .swift_tag \
57+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
58+
&& export GNUPGHOME="$(mktemp -d)" \
59+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
60+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
61+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
62+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
63+
# - Unpack the toolchain, set libs permissions, and clean up.
64+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
65+
&& chmod -R o+r /usr/lib/swift \
66+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
67+
&& apt-get purge --auto-remove -y curl
68+
69+
# Print Installed Swift Version
70+
RUN swift --version
71+
72+
RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \
73+
( \
74+
printf "################################################################\n"; \
75+
printf "# %-60s #\n" ""; \
76+
printf "# %-60s #\n" "Swift Nightly Docker Image"; \
77+
printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \
78+
printf "# %-60s #\n" ""; \
79+
printf "################################################################\n" \
80+
) > /etc/motd
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
FROM ubuntu:24.04
2+
3+
LABEL maintainer="Swift Infrastructure <[email protected]>"
4+
LABEL description="Docker Container for the Swift programming language"
5+
6+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && apt-get -q update && \
7+
apt-get -q install -y \
8+
libcurl4 \
9+
libxml2 \
10+
tzdata \
11+
&& rm -r /var/lib/apt/lists/*
12+
13+
# Everything up to here should cache nicely between Swift versions, assuming dev dependencies change little
14+
15+
# gpg --keyid-format LONG -k F167DF1ACF9CE069
16+
# pub rsa4096/F167DF1ACF9CE069 2021-11-08 [SC] [expires: 2025-11-09]
17+
# E813C892820A6FA13755B268F167DF1ACF9CE069
18+
# uid [ unknown] Swift Automatic Signing Key #4 <[email protected]>
19+
ARG SWIFT_SIGNING_KEY=E813C892820A6FA13755B268F167DF1ACF9CE069
20+
ARG SWIFT_PLATFORM=ubuntu
21+
ARG OS_MAJOR_VER=24
22+
ARG OS_MIN_VER=04
23+
ARG SWIFT_WEBROOT=https://download.swift.org/development
24+
25+
ENV SWIFT_SIGNING_KEY=$SWIFT_SIGNING_KEY \
26+
SWIFT_PLATFORM=$SWIFT_PLATFORM \
27+
OS_MAJOR_VER=$OS_MAJOR_VER \
28+
OS_MIN_VER=$OS_MIN_VER \
29+
OS_VER=$SWIFT_PLATFORM$OS_MAJOR_VER.$OS_MIN_VER \
30+
SWIFT_WEBROOT="$SWIFT_WEBROOT/$SWIFT_PLATFORM$OS_MAJOR_VER$OS_MIN_VER"
31+
32+
RUN set -e; \
33+
# - Grab curl and gpg here so we cache better up above
34+
export DEBIAN_FRONTEND=noninteractive \
35+
&& apt-get -q update && apt-get -q install -y curl gnupg && rm -rf /var/lib/apt/lists/* \
36+
# - Latest Toolchain info
37+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download:' | sed 's/:[^:\/\/]/=/g') \
38+
&& export $(curl -s ${SWIFT_WEBROOT}/latest-build.yml | grep 'download_signature:' | sed 's/:[^:\/\/]/=/g') \
39+
&& export DOWNLOAD_DIR=$(echo $download | sed "s/-${OS_VER}.tar.gz//g") \
40+
&& echo $DOWNLOAD_DIR > .swift_tag \
41+
# - Download the GPG keys, Swift toolchain, and toolchain signature, and verify.
42+
&& export GNUPGHOME="$(mktemp -d)" \
43+
&& curl -fsSL ${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download} -o latest_toolchain.tar.gz \
44+
${SWIFT_WEBROOT}/${DOWNLOAD_DIR}/${download_signature} -o latest_toolchain.tar.gz.sig \
45+
&& curl -fSsL https://swift.org/keys/all-keys.asc | gpg --import - \
46+
&& gpg --batch --verify latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
47+
# - Unpack the toolchain, set libs permissions, and clean up.
48+
&& tar -xzf latest_toolchain.tar.gz --directory / --strip-components=1 \
49+
${DOWNLOAD_DIR}-${OS_VER}/usr/lib/swift/linux \
50+
${DOWNLOAD_DIR}-${OS_VER}/usr/libexec/swift/linux \
51+
&& chmod -R o+r /usr/lib/swift /usr/libexec/swift \
52+
&& rm -rf "$GNUPGHOME" latest_toolchain.tar.gz.sig latest_toolchain.tar.gz \
53+
&& apt-get purge --auto-remove -y curl gnupg
54+
55+
RUN echo "[ -n \"\${TERM:-}\" -a -r /etc/motd ] && cat /etc/motd" >> /etc/bash.bashrc; \
56+
( \
57+
printf "################################################################\n"; \
58+
printf "# %-60s #\n" ""; \
59+
printf "# %-60s #\n" "Swift Nightly Docker Image"; \
60+
printf "# %-60s #\n" "Tag: $(cat .swift_tag)"; \
61+
printf "# %-60s #\n" ""; \
62+
printf "################################################################\n" \
63+
) > /etc/motd

0 commit comments

Comments
 (0)