make this an oci container, not nspawn

This commit is contained in:
Vincent Batts 2019-03-07 14:32:20 -05:00
parent e41a2e81ae
commit 1d5dc44ed3
2 changed files with 40 additions and 0 deletions

19
Makefile Normal file
View file

@ -0,0 +1,19 @@
OUTPUT ?= $(USER)/bip
CTR ?= podman
IMAGE ?= fedora
TAG ?= 29
.PHONY: image
image: .digest
$(CTR) build \
--build-arg "IMAGE=$(IMAGE)" \
--build-arg "IMAGE_TAG=$(TAG)" \
--build-arg "DIGEST=$(shell cat .digest)" \
-t $(OUTPUT) \
.
pull:
$(CTR) pull $(IMAGE):$(TAG)
.digest: pull
$(CTR) images --digests --format "{{.Digest}}" $(IMAGE):$(TAG) | head -1 | tee $@