Skip to content

Commit

Permalink
Only Build The Specific Executable In Dockerfile (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiBM authored Jan 4, 2025
1 parent 250d88a commit d24c31b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ RUN swift package resolve \
# Copy entire repo into container
COPY . .

# Build everything, with optimizations, with static linking, and using jemalloc
# Build the application, with optimizations, with static linking, and using jemalloc
# N.B.: The static version of jemalloc is incompatible with the static Swift runtime.
RUN swift build -c release \
--static-swift-stdlib \
-Xlinker -ljemalloc
--product App \
--static-swift-stdlib \
-Xlinker -ljemalloc

# Switch to the staging area
WORKDIR /staging
Expand Down

0 comments on commit d24c31b

Please sign in to comment.