concourse / docker-image-resource

a resource for docker images
Apache License 2.0
166 stars 260 forks source link

Release docker image for ARM64 #324

Open odidev opened 3 years ago

odidev commented 3 years ago

Hi Team,

I am trying to use the docker-image-resource image in the arm64 ubuntu platform but it seems the arm64 supported tag is not available in the docker hub.

I have tried building the image in the arm64 platform using docker build -t docker-image-resource -f dockerfiles/ubuntu/Dockerfile . command, but it is failing as concourse/golang-builder image is not available for the arm64 platform. I have looked for dockerfile source to build concourse/golang-builder image for the arm64 platform, but I am unable to get the same.

Do you have any plans in adding arm64 support and releasing arm64 images?

If interested, I am happy to contribute. But as a start, it will be helpful if you point me towards the source of concourse/golang-builder image.

xtremerui commented 3 years ago

the job that builds the image is here https://ci.concourse-ci.org/teams/main/pipelines/concourse/jobs/build-golang-builder-image/

we don't have plan for arm64 support yet.

xtremerui commented 3 years ago

Actually we are deprecating this resource in favor of https://github.com/concourse/registry-image-resource and we'd love to adding arm64 support there.

odidev commented 3 years ago

the job that builds the image is here https://ci.concourse-ci.org/teams/main/pipelines/concourse/jobs/build-golang-builder-image/

we don't have plan for arm64 support yet.

Thanks for the reply.

I have checked the build for golang-builder image and built the image on arm64 machine with steps got from the build. As we can see, you are downloading go1.15.7.linux-amd64.tar.gz from here. I have updated tar file link from amd64 to arm64 to make it work for arm64.

I can start building registry-image-resource if golang-builder image is available for arm64. It will be helpful, if it is released.

If required, I am happy to contribute.

xtremerui commented 3 years ago

@odidev sounds like you have already built a golang-builder-image in arm64. You could then fork the registry-image-resource to build the resource image to support arm64. Is there anything else blocking your work or you are expecting concourse to release registry-image-resource for arm64 system?

Just want to prioritize our task here(if we are adding arm64 support for registry-image-resource, we might as well do it for all other base resource types). Thx.

odidev commented 3 years ago

@xtremerui, I have built both golang-builder and registry-image-resource images with base-image as ubuntu:bionic and uploaded them to my repo in docker hub. registry-image-resource: https://hub.docker.com/repository/docker/odidev/registry-image-resource golang-builder: https://hub.docker.com/repository/docker/odidev/golang-builder

Verified the built binaries in the registry-image-resource as well. Please check below for the same:

root@a79adfa62367:/# file /opt/resource/check
/opt/resource/check: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
root@a79adfa62367:/# file /opt/resource/in
/opt/resource/in: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
root@a79adfa62367:/# file /opt/resource/out
/opt/resource/out: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped

I am expecting concourse to release official images for arm64 system. If required, I am happy to contribute.