-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to build ARM64 images #226
Conversation
5.3/ubuntu/18.04/Dockerfile
Outdated
@@ -43,17 +43,23 @@ RUN set -e; \ | |||
&& SWIFT_SIG_URL="$SWIFT_BIN_URL.sig" \ | |||
# - Grab curl here so we cache better up above | |||
&& export DEBIAN_FRONTEND=noninteractive \ | |||
&& apt-get -q update && apt-get -q install -y curl && rm -rf /var/lib/apt/lists/* \ | |||
&& apt-get -q update && apt-get -q install -y curl sudo wget && rm -rf /var/lib/apt/lists/* \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed, especially sudo
, right?
5.3/ubuntu/18.04/Dockerfile
Outdated
&& rm -rf "$GNUPGHOME" swift.tar.gz.sig swift.tar.gz \ | ||
&& apt-get purge --auto-remove -y curl | ||
&& if [ `uname -m` = "aarch64" ] ; then \ | ||
wget https://github.com/futurejones/swift-arm64/releases/download/v5.3.3-RELEASE/swiftlang-5.3.3-ubuntu-18.04-release-aarch64-4-2021-02-01.tar.gz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the redirection through curl
is the issue, then
curl -L https://github.com/futurejones/swift-arm64/releases/download/v5.3.3-RELEASE/swiftlang-5.3.3-ubuntu-18.04-release-aarch64-4-2021-02-01.tar.gz --output swiftlang-5.3.3-ubuntu-18.04-release-aarch64-4-2021-02-01.tar.gz && \
this is doing the trick for me.
Nice idea! Unfortunately, I don't think this can be a permanent solution: too manual, and has to be done per supported architectures. Nevertheless, your PR is a nice quick hack for all of us having an M1 and willing to test it! 🎉 |
Signed-off-by: odidev <[email protected]>
Hi @mbarnach |
@mbarnach |
@odidev It is working fine. No more extra packages. Nonetheless, this is only for Ubuntu 18.04. As said previously, it is great for testing, but I hope the Swift Core team will add the support for ARM64 soon in their official Docker images. |
Official Docker (hub.docker.com) has stop supporting Ubuntu 18.04, I would recommend using Ubuntu 20.04 or 22.04 if possible. |
Fixes #225
Modified 5.3/ubuntu/18.04/Dockerfile to build ARM64 docker images.
Signed-off-by: odidev [email protected]