Skip to content

Commit aac27f1

Browse files
Copilotcommjoen
andcommitted
fix: add gcompat + Swift runtime to Dockerfile for Challenge63 binary on Alpine
Co-authored-by: commjoen <1457214+commjoen@users.noreply.github.com> Agent-Logs-Url: https://github.com/OWASP/wrongsecrets/sessions/f5d8b194-44cb-4526-810c-61f4231b6b47
1 parent 8dda347 commit aac27f1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Dockerfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ARG argBasedVersion="1.13.2"
66
COPY --chown=wrongsecrets target/wrongsecrets-${argBasedVersion}-SNAPSHOT.jar application.jar
77
RUN java -Djarmode=tools -jar application.jar extract --layers --destination extracted
88

9+
FROM swift:6.0.3-slim AS swift-runtime
10+
911
FROM eclipse-temurin:25.0.2_10-jre-alpine
1012
WORKDIR /application
1113

@@ -31,7 +33,13 @@ RUN echo "2vars"
3133
RUN echo "$ARG_BASED_PASSWORD"
3234
RUN echo "$argBasedPassword"
3335

34-
RUN apk add --no-cache libstdc++ icu-libs
36+
RUN apk add --no-cache libstdc++ icu-libs gcompat
37+
38+
RUN mkdir -p /usr/lib/swift/linux
39+
COPY --from=swift-runtime /usr/lib/swift/linux/libswiftCore.so /usr/lib/swift/linux/
40+
COPY --from=swift-runtime /usr/lib/swift/linux/libswift_Concurrency.so /usr/lib/swift/linux/
41+
COPY --from=swift-runtime /usr/lib/swift/linux/libswift_StringProcessing.so /usr/lib/swift/linux/
42+
COPY --from=swift-runtime /usr/lib/swift/linux/libswift_RegexParser.so /usr/lib/swift/linux/
3543

3644
# Create the /var/run/secrets2 directory
3745
RUN mkdir -p /var/run/secrets2

0 commit comments

Comments
 (0)