1
0
Fork
You've already forked MultiArchSwiftDockerfileExample
0
This is an example on how to set up building a multi-architecture docker image using the new Swift Static Linux SDK introduced along with Swift 6.0.
  • Shell 56.5%
  • Swift 33.1%
  • Dockerfile 10.4%
Benedek Kozma e36aa37f12
All checks were successful
ci/woodpecker/push/pr-checks Pipeline was successful
Move warnings as errors to pr-checks
2026年06月18日 14:44:14 +02:00
.vscode
.woodpecker
scripts
Sources/ExampleApp
.dockerignore
.editorconfig
.gitignore
.swiftformat
Dockerfile
Package.resolved
Package.swift Move warnings as errors to pr-checks 2026年06月18日 14:44:14 +02:00
README.md
UNLICENSE.txt

Description

This is an example on how to set up building a multi-architecture docker image using the new Swift Static Linux SDK introduced along with Swift 6.0.

TimeZone support

Supporting different time zones requires the tzdata package. By default this template is using an empty container as the base, the recommended base for only installing a couple smaller packages is alpine. This supports both passing the TZ environment variable and mounting /etc/localtime to set the desired default for classes like DateFormatter.

- FROM scratch AS release
+ FROM alpine AS release
+ RUN apk add --no-cache tzdata

Locale support

As of Swift 6.0.1, Locale.current is hardcoded to be en_001 on Linux. Manually passing a Locale instance to everything that uses it seems to be the only solution for using a custom Locale currently.