tag the image with bip's NVR
This commit is contained in:
parent
bc78eaaf6e
commit
b5e8e23274
2 changed files with 14 additions and 2 deletions
|
@ -14,7 +14,7 @@ RUN dnf update -y --refresh && \
|
||||||
RUN sed -i 's/^#ip/ip/' /etc/bip.conf && \
|
RUN sed -i 's/^#ip/ip/' /etc/bip.conf && \
|
||||||
sed -i 's/^#port/port/' /etc/bip.conf
|
sed -i 's/^#port/port/' /etc/bip.conf
|
||||||
|
|
||||||
VOLUME /var/run/bip
|
VOLUME ["/var/run/bip"]
|
||||||
USER bip
|
USER bip
|
||||||
EXPOSE 7778
|
EXPOSE 7778
|
||||||
ENV HOME=/var/run/bip
|
ENV HOME=/var/run/bip
|
||||||
|
|
14
Makefile
14
Makefile
|
@ -4,7 +4,18 @@ IMAGE ?= fedora
|
||||||
TAG ?= 29
|
TAG ?= 29
|
||||||
|
|
||||||
.PHONY: image
|
.PHONY: image
|
||||||
image: .digest
|
image: .nvr
|
||||||
|
$(CTR) tag $(OUTPUT) $(OUTPUT):$(shell cat .nvr)
|
||||||
|
|
||||||
|
.PHONY: .nvr
|
||||||
|
.nvr: latest
|
||||||
|
$(CTR) run \
|
||||||
|
-it \
|
||||||
|
--rm \
|
||||||
|
$(OUTPUT) \
|
||||||
|
rpm -q bip | tee $@
|
||||||
|
|
||||||
|
latest: .digest
|
||||||
$(CTR) build \
|
$(CTR) build \
|
||||||
--build-arg "IMAGE=$(IMAGE)" \
|
--build-arg "IMAGE=$(IMAGE)" \
|
||||||
--build-arg "IMAGE_TAG=$(TAG)" \
|
--build-arg "IMAGE_TAG=$(TAG)" \
|
||||||
|
@ -15,5 +26,6 @@ image: .digest
|
||||||
pull:
|
pull:
|
||||||
$(CTR) pull $(IMAGE):$(TAG)
|
$(CTR) pull $(IMAGE):$(TAG)
|
||||||
|
|
||||||
|
.PHONY: .digest
|
||||||
.digest: pull
|
.digest: pull
|
||||||
$(CTR) images --digests --format "{{.Digest}}" $(IMAGE):$(TAG) | head -1 | tee $@
|
$(CTR) images --digests --format "{{.Digest}}" $(IMAGE):$(TAG) | head -1 | tee $@
|
||||||
|
|
Reference in a new issue