mirror of
https://github.com/swift-server/swift-aws-lambda-runtime.git
synced 2026-06-02 07:27:33 +00:00
aa6468b360
motivation: swift 5.2.4 now supportes AL2 changes: * add docker-compose file for al2 5.2.4 * correct 5.3 docker-file to say al2 instead of 18.04
26 lines
1.0 KiB
Docker
26 lines
1.0 KiB
Docker
ARG swift_version=5.2
|
|
# FIXME when 5.2 images are available
|
|
ARG base_image=swift:$swift_version-amazonlinux2
|
|
FROM $base_image
|
|
# needed to do again after FROM due to docker limitation
|
|
ARG swift_version
|
|
|
|
# dependencies
|
|
RUN yum install -y wget perl-Digest-SHA
|
|
RUN yum install -y lsof dnsutils netcat-openbsd net-tools curl jq # used by integration tests
|
|
|
|
# tools
|
|
RUN mkdir -p $HOME/.tools
|
|
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
|
|
|
|
# script to allow mapping framepointers on linux (until part of the toolchain)
|
|
RUN wget -q https://raw.githubusercontent.com/apple/swift/master/utils/symbolicate-linux-fatal -O $HOME/.tools/symbolicate-linux-fatal
|
|
RUN chmod 755 $HOME/.tools/symbolicate-linux-fatal
|
|
|
|
# swiftformat (until part of the toolchain)
|
|
|
|
ARG swiftformat_version=0.44.6
|
|
RUN git clone --branch $swiftformat_version --depth 1 https://github.com/nicklockwood/SwiftFormat $HOME/.tools/swift-format
|
|
RUN cd $HOME/.tools/swift-format && swift build -c release
|
|
RUN ln -s $HOME/.tools/swift-format/.build/release/swiftformat $HOME/.tools/swiftformat
|