1
1
# ================================
2
2
# Build image
3
3
# ================================
4
- FROM swift:5.7 -jammy as build
4
+ FROM swift:5.9 -jammy as build
5
5
6
6
# Install OS updates and, if needed, sqlite3
7
7
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
@@ -17,13 +17,18 @@ WORKDIR /build
17
17
# as long as your Package.swift/Package.resolved
18
18
# files do not change.
19
19
COPY ./Package.* ./
20
- RUN swift package resolve
20
+ RUN swift package resolve --skip-update \
21
+ $([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true)
21
22
22
23
# Copy entire repo into container
23
24
COPY . .
24
25
25
26
# Build everything, with optimizations
26
27
RUN 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
27
32
28
33
# Switch to the staging area
29
34
WORKDIR /staging
@@ -42,7 +47,7 @@ RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w
42
47
# ================================
43
48
# Run image
44
49
# ================================
45
- FROM ubuntu: jammy
50
+ FROM swift:5.9- jammy-slim
46
51
47
52
# Make sure all system packages are up to date, and install only essential packages.
48
53
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
0 commit comments