gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

Add platform flag for docker build without a reliance on docker buildx

Open pguinard-public-com opened this issue 3 years ago • 2 comments

Before this PR

Platform flag is only supported for docker buildx and not docker.

Example of the docker command we would like to run:

docker build --platform linux/arm64 -t example .

After this PR

The platform flag will be supported such as this to build for a single platform:

docker {
    name "example:$version"
    platform "arm64"

Possible downsides?

On upgrade from one version to a version with this commit in it while having the platform flag in a non working state would cause gradle to throw errors rather than silently ignore.

pguinard-public-com avatar Aug 04 '22 15:08 pguinard-public-com

Thanks for your interest in palantir/gradle-docker, @pguinard-public-com! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

palantirtech avatar Aug 04 '22 15:08 palantirtech

Generate changelog in changelog/@unreleased

Type See change types. Select one:

  • [ ] Feature
  • [ ] Improvement
  • [ ] Fix
  • [ ] Break
  • [ ] Deprecation
  • [ ] Manual task
  • [ ] Migration

Description Add platform flag for docker build without a reliance on docker buildx

Before this PR

Platform flag is only supported for docker buildx and not docker.

Example of the docker command we would like to run:

docker build --platform linux/arm64 -t example .

After this PR

The platform flag will be supported such as this to build for a single platform:

docker {
    name "example:$version"
    platform "arm64"

Possible downsides?

On upgrade from one version to a version with this commit in it while having the platform flag in a non working state would cause gradle to throw errors rather than silently ignore.

Check the box to generate changelog(s)

  • [ ] Generate changelog entry

changelog-app[bot] avatar Aug 04 '22 15:08 changelog-app[bot]