mirror of
https://github.com/thegeeklab/ansible-later.git
synced 2024-11-16 10:00:39 +00:00
22 lines
755 B
Makefile
22 lines
755 B
Makefile
|
DOCKERHOST = DOCKERHOST
|
||
|
DOCKERORG = DOCKERORG
|
||
|
IMAGENAME = {{ role_name }}
|
||
|
TAG = latest
|
||
|
USER=$(shell id -u)
|
||
|
PWD=$(shell pwd)
|
||
|
build_and_push: apb_build docker_push apb_push
|
||
|
|
||
|
.PHONY: apb_build
|
||
|
apb_build:
|
||
|
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest prepare
|
||
|
docker build -t $(DOCKERHOST)/$(DOCKERORG)/$(IMAGENAME):$(TAG) .
|
||
|
|
||
|
.PHONY: docker_push
|
||
|
docker_push:
|
||
|
docker push $(DOCKERHOST)/$(DOCKERORG)/$(IMAGENAME):$(TAG)
|
||
|
|
||
|
.PHONY: apb_push
|
||
|
apb_push:
|
||
|
docker run --rm --privileged -v $(PWD):/mnt:z -v $(HOME)/.kube:/.kube -v /var/run/docker.sock:/var/run/docker.sock -u $(USER) docker.io/ansibleplaybookbundle/apb-tools:latest push
|
||
|
|