From 7838c911a2fc8a5c1984ee1a725d7ff4ab1960d4 Mon Sep 17 00:00:00 2001 From: Eric Shepherd Date: Thu, 9 Feb 2023 20:01:29 +0000 Subject: [PATCH 1/3] 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. --- swift/Dockerfile | 4 ++-- swift/tools/{swiftbuild => swiftbuild.py} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename swift/tools/{swiftbuild => swiftbuild.py} (100%) diff --git a/swift/Dockerfile b/swift/Dockerfile index 38ccc768919..341e5b94f1d 100644 --- a/swift/Dockerfile +++ b/swift/Dockerfile @@ -5,7 +5,7 @@ # Although some examples work on earlier versions of Swift, the # version below will run all examples. -FROM swift:5.6 +FROM swift # Install Python for the scripts and tools. @@ -16,5 +16,5 @@ RUN apt-get update && \ COPY . /swift/ RUN cd /swift/example_code/ && \ - ../tools/swiftbuild */* + python3.10 ../tools/swiftbuild.py */* CMD ["bash"] diff --git a/swift/tools/swiftbuild b/swift/tools/swiftbuild.py similarity index 100% rename from swift/tools/swiftbuild rename to swift/tools/swiftbuild.py From 31d69e9c3cb05d86189588fb6b7bf60dcd997eb9 Mon Sep 17 00:00:00 2001 From: Eric Shepherd Date: Thu, 9 Feb 2023 20:11:47 +0000 Subject: [PATCH 2/3] Reword dockerfile comment --- swift/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swift/Dockerfile b/swift/Dockerfile index 341e5b94f1d..be5a201af95 100644 --- a/swift/Dockerfile +++ b/swift/Dockerfile @@ -2,8 +2,9 @@ # Status: Beta # GA updates: https://github.com/awsdocs/aws-doc-sdk-examples/issues/4132 -# Although some examples work on earlier versions of Swift, the -# version below will run all examples. +# Our examples require a variety of versions of Swift at a minimum depending +# on what features of the SDK they use. Here we will just pull the most recent +# version of the official Swift Docker image. FROM swift From 0544c5cb64399007f8b8f9e3f16303391d859365 Mon Sep 17 00:00:00 2001 From: Eric Shepherd Date: Thu, 9 Feb 2023 20:43:09 +0000 Subject: [PATCH 3/3] Tweak wording one more time. --- swift/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/swift/Dockerfile b/swift/Dockerfile index be5a201af95..7980598cb49 100644 --- a/swift/Dockerfile +++ b/swift/Dockerfile @@ -2,9 +2,9 @@ # Status: Beta # GA updates: https://github.com/awsdocs/aws-doc-sdk-examples/issues/4132 -# Our examples require a variety of versions of Swift at a minimum depending -# on what features of the SDK they use. Here we will just pull the most recent -# version of the official Swift Docker image. +# Our examples have various minimum Swift versions, depending on what features +# of the SDK they use. Here we will just pull the most recent version of the +# official Swift Docker image. FROM swift