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

Dockerfile config for arm64 #1259

Merged
merged 2 commits into from Feb 8, 2021
Merged

Dockerfile config for arm64 #1259

merged 2 commits into from Feb 8, 2021

Conversation

kvalev
Copy link

@kvalev kvalev commented Feb 6, 2021

This allows using the same Dockerfile for both armhf and arm64.

@abraunegg I would like to also add automated builds, but couldnt find how its done for amd64. Can you point me in the right direction?

@abraunegg
Copy link
Owner

@kvalev

This allows using the same Dockerfile for both armhf and arm64.

Many thanks for the contribution.

Is there any way to auto detect ARCH to choose the right ARCH, so that the file does not need to be manually edited to build against the right architecture?

@abraunegg I would like to also add automated builds, but couldnt find how its done for amd64. Can you point me in the right direction?

Unfortunately the Docker build service only allows automated builds against X86 architectures. To build / publish ARM builds, would require a completely different CI/CD process, building on a different system, then pushing the image to Docker.

@abraunegg abraunegg added this to the v2.4.10 milestone Feb 6, 2021
@kvalev
Copy link
Author

kvalev commented Feb 6, 2021

Is there any way to auto detect ARCH to choose the right ARCH, so that the file does not need to be manually edited to build against the right architecture?

Docker provides few default arguments - TARGETPLATFORM, TARGETOS, TARGETARCH and TARGETVARIANT, but none of them match the architecture strings used by ldc.

Unfortunately the Docker build service only allows automated builds against X86 architectures. To build / publish ARM builds, would require a completely different CI/CD process, building on a different system, then pushing the image to Docker.

It seems there are 1 or 2 ways to install QEMU using docker hub hooks, but this would mean that the Dockerfiles have to be tweaked, which is not ideal. So the only realistic way is to do it using a different CI - I guess travis, given that it is already used it in the project. Using buildx it is fairly easy to build those arm Docker images on plain linux:

# armv7
docker buildx build --platform=linux/arm/v7 -t driveone/onedrive:${TAG}-armv7 -f contrib/docker/Dockerfile-rpi --build-arg ARCH=armhf --push .

# arm64
docker buildx build --platform=linux/arm64 -t driveone/onedrive:${TAG}-arm64 -f contrib/docker/Dockerfile-rpi --build-arg ARCH=aarch64 --push .

# create a manifest for all 3 architectures
docker buildx imagetools create --tag driveone/onedrive:${TAG} driveone/onedrive:${TAG}-amd64 driveone/onedrive:${TAG}-arm64 driveone/onedrive:${TAG}-armv7

@abraunegg abraunegg merged commit a971dd0 into abraunegg:master Feb 8, 2021
@kvalev kvalev deleted the kvv-docker-arm64 branch March 5, 2021 08:18
abraunegg added a commit that referenced this pull request Mar 10, 2021
abraunegg added a commit that referenced this pull request Mar 10, 2021
* Revert PR #1259
* Provide dedicated armhf & aarch64 Dockerfiles
abraunegg added a commit that referenced this pull request Mar 14, 2021
* Revert PR #1259
* Provide dedicated armhf & aarch64 Dockerfiles
* Document updates
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants