PROJECT = errorlogger VERSION = 0.1 ECR_REPO = git.caliban.io/martin # APP_IMAGE = 482681734622.dkr.ecr.eu-west-1.amazonaws.com/$(PROJECT):$(VERSION) APP_IMAGE = $(ECR_REPO)/$(PROJECT):$(VERSION) # APP_IMAGE = $(PROJECT):$(VERSION) NO_CACHE = true .PHONY: build build: GCO_ENABLED=0 GOOS=linux go build -o ${PROJECT} main.go # docker build ./docker/. -t $(APP_IMAGE) --build-arg VERSION=$(VERSION) --no-cache=$(NO_CACHE) --compress=true docker build --platform linux/amd64 --no-cache -force-rm --tag ${APP_IMAGE} --file ./docker/Dockerfile . #push docker image to registry .PHONY: push push: build docker push $(APP_IMAGE) #push docker image to registry .PHONY: run run: build docker run $(APP_IMAGE) ver: @echo '$(VERSION)' #echo $ERSION .PHONY: ver