Docker Community Forums

Share and learn in the Docker community.

Creating a docker image for ARM architecture of a gradle project

I am trying to create a docker image for the arm architecture of my gradle project, below is the docker file that I am using to create a image for amd aarch

# this dockerfile is used for github action
FROM gradle:6.5.0-jdk8 as builder

# build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build

# settle down the executable
FROM adoptopenjdk:8-jdk-hotspot
COPY --from=builder /home/gradle/src/build/distributions/sample-1.0-SNAPSHOT.tar /app/
RUN tar -xvf sample-1.0-SNAPSHOT.tar

# run
ENTRYPOINT /app/generator-1.0-SNAPSHOT/bin/sample

can someone suggest me what are the changes that I will have to make it working for ARM64 aarch.
right now I get below errors for ARm ARch

 => ERROR [linux/arm64 internal] load metadata for                                                                                      4.9s
 => ERROR [linux/arm64 builder 1/4] FROM

Create pipeline with build step
Sign in to your Azure DevOps organization and navigate to your project.

Go to Pipelines, and then select New Pipeline.

Select GitHub as the location of your source code and select your repository.


You might be redirected to GitHub to sign in. If so, enter your GitHub credentials. You might be redirected to GitHub to install the Azure Pipelines app. If so, select Approve and install.

Select Starter pipeline. In the Review tab, replace the contents of azure-pipelines.yml with the following snippet -



  • master

vmImage: ‘Ubuntu-16.04’

imageName: ‘pipelines-javascript-docker’


  • task: Docker@2
    displayName: Build an image
    repository: $(imageName)
    command: build
    Dockerfile: app/Dockerfile
    Select Save and run, after which you’re prompted for a commit message as Azure Pipelines adds the azure-pipelines.yml file to your repository. After editing the message, select Save and run again to see the pipeline in action.