Skip to content

Commit

Permalink
update docker build to add platform targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
kylerisse committed Mar 15, 2024
1 parent 1a4fbab commit 1e19683
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 1e19683

Please sign in to comment.