From fae6ffaf35473aba2a1290a2caff98579306c635 Mon Sep 17 00:00:00 2001 From: MahdiBM Date: Sun, 5 Jan 2025 14:41:38 +0330 Subject: [PATCH] Optimize Dockerfile --- Dockerfile | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0fe8c96d..df313ae8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,11 @@ # ================================ # Build image # ================================ -FROM swift:6.0-jammy as build +FROM ubuntu:jammy as build ARG SWIFT_CONFIGURATION ARG EXEC_NAME -# Install OS updates -RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \ - && apt-get -q update \ - && apt-get -q dist-upgrade -y \ - && apt-get install -y libjemalloc-dev - WORKDIR /staging # Copy .build to staging area @@ -21,7 +15,7 @@ COPY .build ./.build RUN mv .build/$SWIFT_CONFIGURATION/$EXEC_NAME ./ # Copy static swift backtracer binary to staging area -RUN cp "/usr/libexec/swift/linux/swift-backtrace-static" ./ +COPY "/usr/libexec/swift/linux/swift-backtrace-static" ./ # Copy resources bundled by SPM to staging area RUN find -L ".build/$SWIFT_CONFIGURATION/" -regex '.*\.resources$' -exec cp -Ra {} ./ \;