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

Support multi platform Docker build (buildx) #151

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ To apply your own patches to the Cantaloupe source, create patchfiles with a Git

Patching an older version of Cantaloupe is possible as well.

To use Docker buildkit (builx), supply the list of architectures to build:

mvn verify -Ddocker.platforms=linux/amd64,linux/arm64

_Hint: If you want to run a build without a Docker cache, add `-Ddocker.noCache` to your mvn command; for instance: `mvn verify -Ddocker.noCache`_

### Run the Cantaloupe container
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<docker.cleanup>remove</docker.cleanup>
<docker.image>cantaloupe${artifact.qualifier}</docker.image>
<docker.showLogs>true</docker.showLogs>
<docker.platforms></docker.platforms>

<!-- We don't need to build the jar outside of the Docker build -->
<jar.phase></jar.phase>
Expand Down Expand Up @@ -394,6 +395,12 @@
<name>${docker.image}</name>
<build>
<dockerFile>${project.basedir}/src/main/docker/Dockerfile</dockerFile>
<buildx>
<platforms>
<!-- set comma separated list of platforms in ${docker.platforms} to invoke buildkit -->
<platform>${docker.platforms}</platform>
</platforms>
</buildx>
</build>
<run>
<ports>
Expand Down
Loading