Compare commits
No commits in common. "6bc2dbcd77123ea6c33856bf50e5011ebc54b737" and "95143f428419fc3f6c07378838bc7ee484f3e9bf" have entirely different histories.
6bc2dbcd77
...
95143f4284
22
Makefile
22
Makefile
@ -1,22 +0,0 @@
|
|||||||
IMAGE_NAME = borgbackup
|
|
||||||
IMAGE_REPOSITORY ?= vcs.enp.one/skylab
|
|
||||||
VERSION ?= 1.2.3
|
|
||||||
|
|
||||||
OCI_CMD = $(shell which podman || which docker)
|
|
||||||
|
|
||||||
ifeq ($(OCI_CMD),)
|
|
||||||
$(error "No supported container build tool found (one of: podman, docker)")
|
|
||||||
endif
|
|
||||||
|
|
||||||
image: ## Build docker container
|
|
||||||
$(info Using $(OCI_CMD) for container interface)
|
|
||||||
@ $(OCI_CMD) build . --file Containerfile --tag $(IMAGE_NAME):$(VERSION) --build-arg borg_version=$(VERSION)
|
|
||||||
|
|
||||||
publish: image ## Build docker container and publish to the docker registry
|
|
||||||
@ $(OCI_CMD) tag $(IMAGE_NAME):$(VERSION) $(IMAGE_REPOSITORY)/$(IMAGE_NAME):$(VERSION)
|
|
||||||
@ $(OCI_CMD) push $(IMAGE_REPOSITORY)/$(IMAGE_NAME):$(VERSION)
|
|
||||||
|
|
||||||
latest: publish ## Build docker container and publish to the docker registry as the latest version
|
|
||||||
@ $(OCI_CMD) tag $(IMAGE_NAME):$(VERSION) $(IMAGE_NAME):latest
|
|
||||||
@ $(OCI_CMD) tag $(IMAGE_REPOSITORY)/$(IMAGE_NAME):$(VERSION) $(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest
|
|
||||||
@ $(OCI_CMD) push $(IMAGE_REPOSITORY)/$(IMAGE_NAME):latest
|
|
Loading…
x
Reference in New Issue
Block a user