Skip to content

Commit 34a59d7

Browse files
committed
Inline Docker build script
With #6193, both Docker variants are built on different machines, so that not both binaries need to be handled at once. Also, the linker flags shouldn't be necessary with binaries being linked statically on Linux by default.
1 parent ede2006 commit 34a59d7

2 files changed

Lines changed: 3 additions & 38 deletions

File tree

‎Dockerfile‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ COPY Plugins Plugins/
1010
COPY Source Source/
1111
COPY Tests Tests/
1212
COPY Package.* ./
13-
COPY tools/build-linux-release.sh tools/
1413
ARG TARGETPLATFORM
15-
RUN --mount=type=cache,target=/workspace/.build,id=build-$TARGETPLATFORM ./tools/build-linux-release.sh
14+
RUN swift build -c release --product swiftlint
15+
RUN mv $(swift build -c release --show-bin-path)/swiftlint .
1616

1717
# Runtime image
1818
FROM ubuntu:${UBUNTU_VERSION} AS runtime
@@ -50,9 +50,7 @@ COPY --from=builder /usr/lib/swift/linux/libswiftDispatch.so /usr/lib
5050
COPY --from=builder /usr/lib/swift/linux/libswiftGlibc.so /usr/lib
5151
COPY --from=builder /usr/lib/swift/linux/libswiftSynchronization.so /usr/lib
5252
COPY --from=builder /usr/lib/swift/linux/libswiftSwiftOnoneSupport.so /usr/lib
53-
COPY --from=builder /workspace/swiftlint_linux_* /usr/bin
54-
55-
RUN ln -s /usr/bin/swiftlint_linux_* /usr/bin/swiftlint
53+
COPY --from=builder /workspace/swiftlint /usr/bin
5654

5755
RUN swiftlint version
5856
RUN echo "_ = 0" | swiftlint --use-stdin

‎tools/build-linux-release.sh‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)