Skip to content

Commit 87517d2

Browse files
authored
Merge pull request #473 from NVIDIA/docker-build-opts
[Makefile] make docker build options overridable
2 parents b81f587 + 6a960d6 commit 87517d2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

multi-arch.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
PUSH_ON_BUILD ?= false
1616
ATTACH_ATTESTATIONS ?= false
17-
DOCKER_BUILD_OPTIONS = --output=type=image,push=$(PUSH_ON_BUILD) --provenance=$(ATTACH_ATTESTATIONS) --sbom=$(ATTACH_ATTESTATIONS)
18-
DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64,linux/arm64
17+
DOCKER_BUILD_OPTIONS ?= --output=type=image,push=$(PUSH_ON_BUILD) --provenance=$(ATTACH_ATTESTATIONS) --sbom=$(ATTACH_ATTESTATIONS)
18+
DOCKER_BUILD_PLATFORM_OPTIONS ?= --platform=linux/amd64,linux/arm64
1919

2020
REGCTL ?= regctl
2121
$(DRIVER_PUSH_TARGETS): push-%:

native-only.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64
15+
PUSH_ON_BUILD ?= false
16+
DOCKER_BUILD_OPTIONS ?= --output=type=image,push=$(PUSH_ON_BUILD)
17+
DOCKER_BUILD_PLATFORM_OPTIONS ?= --platform=linux/amd64
1618

1719
$(DRIVER_PUSH_TARGETS): push-%:
1820
$(DOCKER) tag "$(IMAGE)" "$(OUT_IMAGE)"

0 commit comments

Comments
 (0)