Skip to content

Commit 0538fca

Browse files
authored
fix: User Swift 5.9 Docker image (#53)
* fix: Update to docker image to Swift 5.9 * nit * nit * update parse server to 6.3
1 parent 54aa011 commit 0538fca

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

Dockerfile

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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
77
RUN 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.
1919
COPY ./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
2324
COPY . .
2425

2526
# Build everything, with optimizations
2627
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
2732

2833
# Switch to the staging area
2934
WORKDIR /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.
4853
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \

Sources/App/entrypoint.swift

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ enum Entrypoint {
3636

3737
let app = Application(env)
3838

39-
defer {
40-
app.shutdown()
41-
}
39+
defer { app.shutdown() }
4240

4341
try await parseServerSwiftConfigure(app)
4442
try await app.runFromAsyncMainEntrypoint()

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ services:
7474
depends_on:
7575
- parse
7676
parse:
77-
image: netreconlab/parse-hipaa:6.1.0-dashboard
77+
image: netreconlab/parse-hipaa:6.3.0-dashboard
7878
# Uncomment the image below to use Parse Server 5.4.0 instead. Be sure to comment out 6.0.0x
7979
#image: netreconlab/parse-hipaa:5.4.0-dashboard
8080
environment:

0 commit comments

Comments
 (0)