Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

odidev
Copy link

@odidev odidev commented Mar 9, 2021

Fixes #225

Modified 5.3/ubuntu/18.04/Dockerfile to build ARM64 docker images.

Signed-off-by: odidev [email protected]

@@ -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/* \

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?

&& 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 && \

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.

@mbarnach
Copy link

Nice idea! Unfortunately, I don't think this can be a permanent solution: too manual, and has to be done per supported architectures.
On the Swift Forums, there is a nice discussion about Swift supporting ARM M1 (https://forums.swift.org/t/arm64-swift-docker-images/43864/4). I think we need to raise the attention to that to get it through!

Nevertheless, your PR is a nice quick hack for all of us having an M1 and willing to test it! 🎉

@odidev
Copy link
Author

odidev commented Mar 23, 2021

Hi @mbarnach
Thanks for the suggestion. I have removed the sudo and wget from installation and used curl to download SWIFT-ARM binaries and have amended the changes.

@odidev
Copy link
Author

odidev commented Apr 22, 2021

@mbarnach
Can you please review this PR and let me know if any changes are required?

@mbarnach
Copy link

@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.

@shahmishal
Copy link
Member

Official Docker (hub.docker.com) has stop supporting Ubuntu 18.04, I would recommend using Ubuntu 20.04 or 22.04 if possible.

@shahmishal shahmishal closed this Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Require images for ARM64
3 participants