swift image, and runs that executable as processes. The web process serves HTTP, and jobs run database migrations with the same executable before each deployment.
Framework guides
Vapor
Deploy Vapor 4 with Fluent and PostgreSQL, built on the official swift images, with the migrations in a job.
How Swift applications run on Sevalla
Every process (web, worker, cron job and job) runs from the same image, each with its own start command. See Processes.
Pin the Swift version
The Dockerfile’sFROM lines set the Swift version: swift:6.4-noble compiles with the newest Swift 6.4 release, and swift:6.4-noble-slim runs the executable on the runtime libraries of the same release. Keep both stages on the same version and Ubuntu release, because the executable links to the runtime libraries of the compiler that built it.
A line tag such as 6.4-noble moves to each 6.4 patch release and to Ubuntu’s security fixes, so every new build picks them up. A full version, such as 6.4.1-noble, stays on that release. The swift-tools-version line at the top of Package.swift is the oldest Swift that can read the manifest, not the version that builds it.
Build with a Dockerfile
A Dockerfile for a Swift application builds in one stage and runs in another. The build stage uses the officialswift image, copies Package.swift and Package.resolved first and resolves the dependencies in their own layer, then copies the sources and builds the executable product in release mode. The dependencies compile again on every build, which takes most of the build time. The final stage starts from the matching -slim image, copies only the executable, owned by root, and runs it as user 1000:1000 with an exec-form ENTRYPOINT, so the server is process 1 and receives SIGTERM. The Vapor guide has a tested Dockerfile and what it changes from the one that vapor new generates.