Skip to content

Commit eac4835

Browse files
shepazonEric Shepherdmeyertst-aws
authored
Dockerfile fixes (#4377)
* Dockerfile compatibility for newer Swift versions Versions of the Swift docker image for version 5.7 and later have differences that prevented the Dockerfile's instructions from working correctly, and did not work with the `swiftbuild` script. This is fixed in this commit thusly: * Changed the Dockerfile to pull the most recent Swift instead of Swift 5.6. This is done because the Swift 5.6 docker image doesn't work for ARM Macs. * Changed the name of `swiftbuild` to `swiftbuild.py` to clarify that it's a Python script. * Changed the Dockerfile to invoke `swiftbuild` by directly executing `python3.10 swiftbuild.py`. This both uses the name for the Python installed on the more recent image and is updated for the new name of the script. * Reword dockerfile comment * Tweak wording one more time. --------- Co-authored-by: Eric Shepherd <[email protected]> Co-authored-by: Steven Meyer <[email protected]>
1 parent baed18a commit eac4835

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

swift/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# Status: Beta
33
# GA updates: https://github.com/awsdocs/aws-doc-sdk-examples/issues/4132
44

5-
# Although some examples work on earlier versions of Swift, the
6-
# version below will run all examples.
5+
# Our examples have various minimum Swift versions, depending on what features
6+
# of the SDK they use. Here we will just pull the most recent version of the
7+
# official Swift Docker image.
78

8-
FROM swift:5.6
9+
FROM swift
910

1011
# Install Python for the scripts and tools.
1112

@@ -16,5 +17,5 @@ RUN apt-get update && \
1617

1718
COPY . /swift/
1819
RUN cd /swift/example_code/ && \
19-
../tools/swiftbuild */*
20+
python3.10 ../tools/swiftbuild.py */*
2021
CMD ["bash"]
File renamed without changes.

0 commit comments

Comments
 (0)