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

ARM64 build compatibility #36

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

ARM64 build compatibility #36

wants to merge 5 commits into from

Conversation

mickkael
Copy link

@mickkael mickkael commented Sep 3, 2020

I've modified all the scripts to allow the build for arm64

@ghost
Copy link

ghost commented Sep 3, 2020

CLA assistant check
All CLA requirements met.

@odidev
Copy link

odidev commented Oct 16, 2020

I am also interested in the arm64 release of acr-docker-credential-helper.

I was trying to build with these changes in arm64. I think there are few changes required to make it work on arm64. Please check below for the changes required:

  • In build.sh file -
  1. At line no. 4 instead of buildGoArch="amd64" we should check the architecture of the platform like -

     if [ "$(uname -m)" == "aarch64" ]
     then
        buildGoArch="arm64"
     else
        buildGoArch="amd64"
     fi
    
  2. At Line no.-14 instead of “docker run --name ${buildContainerName} ${buildImageName}” it should be “docker run --name ${buildContainerName} -e GOARCH=$buildGoArch ${buildImageName}

  • In DOCKERFILE at line no. 1 we should replace “FROM golang:1.8-alpine” with “FROM golang:1.14-alpine” as golang:1.8-alpine image is not available for arm64.

After these changes, the binary for arm64 was created successfully. So, I think it will be good to add the small changes mentioned above to make it in arm64.

@mickkael
Copy link
Author

I am also interested in the arm64 release of acr-docker-credential-helper.

I was trying to build with these changes in arm64. I think there are few changes required to make it work on arm64. Please check below for the changes required:

  • In build.sh file -
  1. At line no. 4 instead of buildGoArch="amd64" we should check the architecture of the platform like -
     if [ "$(uname -m)" == "aarch64" ]
     then
        buildGoArch="arm64"
     else
        buildGoArch="amd64"
     fi
    
  2. At Line no.-14 instead of “docker run --name ${buildContainerName} ${buildImageName}” it should be “docker run --name ${buildContainerName} -e GOARCH=$buildGoArch ${buildImageName}
  • In DOCKERFILE at line no. 1 we should replace “FROM golang:1.8-alpine” with “FROM golang:1.14-alpine” as golang:1.8-alpine image is not available for arm64.

After these changes, the binary for arm64 was created successfully. So, I think it will be good to add the small changes mentioned above to make it in arm64.

Actually I launch the build by providing GOARCH as a parameter, and it works without any issue. But yes your modification would make it nicer. I'll test and update

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.

2 participants