Skip to content

Commit

Permalink
makefile: adding docker-image and docker-publish rules
Browse files Browse the repository at this point in the history
  • Loading branch information
pnx committed May 9, 2024
1 parent 1c1f537 commit ea52a38
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
CFGDIR=$(PREFIX)/etc/thalos

.PHONY: build build/$(PROGRAM) build/thalos-tools test
.PHONY: build build/$(PROGRAM) build/thalos-tools test docker-image docker-publish

build: build/$(PROGRAM)

Expand All @@ -20,6 +20,12 @@ tools : build/thalos-tools
build/thalos-tools :
$(GO) build $(GOBUILDFLAGS) -o $@ $(shell find cmd/tools -type f -name *.go)

docker-image:
docker image build --build-arg VERSION=$(PROGRAM_VERSION) -t ghcr.io/eosswedenorg/thalos:$(PROGRAM_VERSION) docker

docker-publish:
docker publish ghcr.io/eosswedenorg/thalos:$(PROGRAM_VERSION)

install: build tools
install -D build/$(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM)
install -D build/thalos-tools $(DESTDIR)$(BINDIR)/thalos-tools
Expand Down

0 comments on commit ea52a38

Please sign in to comment.