11# ================================
22# Build image
33# ================================
4- FROM swift:5.7 -jammy as build
4+ FROM swift:5.9 -jammy as build
55
66# Install OS updates and, if needed, sqlite3
77RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
@@ -17,13 +17,18 @@ WORKDIR /build
1717# as long as your Package.swift/Package.resolved
1818# files do not change.
1919COPY ./Package.* ./
20- RUN swift package resolve
20+ RUN swift package resolve --skip-update \
21+ $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true)
2122
2223# Copy entire repo into container
2324COPY . .
2425
2526# Build everything, with optimizations
2627RUN swift build -c release --static-swift-stdlib
28+ # RUN swift build -c release --static-swift-stdlib \
29+ # Workaround for https://github.com/apple/swift/pull/68669
30+ # This can be removed as soon as 5.9.1 is released, but is harmless if left in.
31+ # -Xlinker -u -Xlinker _swift_backtrace_isThunkFunction
2732
2833# Switch to the staging area
2934WORKDIR /staging
@@ -42,7 +47,7 @@ RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w
4247# ================================
4348# Run image
4449# ================================
45- FROM ubuntu: jammy
50+ FROM swift:5.9- jammy-slim
4651
4752# Make sure all system packages are up to date, and install only essential packages.
4853RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
0 commit comments