From ea52a3848e719e048327b90fb3db8c8e68e623cc Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 9 May 2024 11:38:09 +0200 Subject: [PATCH] makefile: adding docker-image and docker-publish rules --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4595606..b42c686 100644 --- a/Makefile +++ b/Makefile @@ -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) @@ -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