Files
swift-service-lifecycle/docker/Dockerfile
T
Rick Newton-RogersandYim Lee 4d11d9817d Bump minimum Swift version to 5.7 (#160)
* Bump minimum Swift version to 5.7

Motivation:

Now that Swift 5.9 is GM we should update the supported versions and
remove 5.6

Modifications:

* Update `Package.swift`
* Delete the <5.7 docker compose files and make a 5.10 one
* Update the 5.9 docker file to stop using nightlies

Result:

Remove support for Swift 5.6, add 5.10

* Remove '--enable-test-discovery'

To see if it's causing CI build getting stuck

---------

Co-authored-by: Yim Lee <yim_lee@apple.com>
2023-10-05 10:44:21 +01:00

25 lines
801 B
Docker

ARG swift_version=5.7
ARG ubuntu_version=focal
ARG base_image=swift:$swift_version-$ubuntu_version
FROM $base_image
# needed to do again after FROM due to docker limitation
ARG swift_version
ARG ubuntu_version
# set as UTF-8
RUN apt-get update && apt-get install -y locales locales-all
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# tools
RUN mkdir -p $HOME/.tools
RUN echo 'export PATH="$HOME/.tools:$PATH"' >> $HOME/.profile
# swiftformat (until part of the toolchain)
ARG swiftformat_version=0.51.7
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