Skip to content

Commit

Permalink
Merge pull request #69 from kylerisse/add_container_platform_targetting
Browse files Browse the repository at this point in the history
[READY] update docker build to add platform targeting
  • Loading branch information
sarcasticadmin authored Mar 15, 2024
2 parents 1a4fbab + 1e19683 commit dbdd1d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ DOCKERCMD = docker
# TODO: dockerhub for scale eventually
DOCKERREPO = sarcasticadmin
IMAGENAME ?= scale-signs
DOCKERBUILD = $(DOCKERCMD) build
TARGETPLATFORM ?= "linux/amd64"
DOCKERBUILD = $(DOCKERCMD) buildx build

DOCKERVERSION ?= $(shell git rev-parse --short HEAD)

docker-build:
$(DOCKERBUILD) -t "$(DOCKERREPO)/$(IMAGENAME):$(DOCKERVERSION)" .
$(DOCKERBUILD) --platform $(TARGETPLATFORM) -t "$(DOCKERREPO)/$(IMAGENAME):$(DOCKERVERSION)" .

docker-push: docker-build
$(DOCKERCMD) push "$(DOCKERREPO)/$(IMAGENAME):$(DOCKERVERSION)"
Expand Down

0 comments on commit dbdd1d8

Please sign in to comment.