Skip to content

Commit

Permalink
Update base container image from alpine:3.10 to alpine:3.11
Browse files Browse the repository at this point in the history
* Add `make image` and `make push` targets to use rootless
buildah for regular development. Retain docker build for
Travis CI
  • Loading branch information
dghubble committed Feb 8, 2020
1 parent 90a91f7 commit 81341e4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.10
FROM alpine:3.11
LABEL maintainer="Dalton Hubble <[email protected]>"
COPY bin/matchbox /matchbox
EXPOSE 8080
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,20 @@ lint:
fmt:
@test -z $$(go fmt ./...)

.PHONY: image
image:
@buildah bud -t $(LOCAL_REPO):$(VERSION) .
@buildah tag $(LOCAL_REPO):$(VERSION) $(LOCAL_REPO):latest

.PHONY: push
push:
@buildah tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):$(VERSION)
@buildah tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):latest
@buildah push docker://$(IMAGE_REPO):$(VERSION)
@buildah push docker://$(IMAGE_REPO):latest

# for travis only

.PHONY: docker-image
docker-image:
@sudo docker build --rm=true -t $(LOCAL_REPO):$(VERSION) .
Expand Down
2 changes: 1 addition & 1 deletion contrib/dnsmasq/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.10
FROM alpine:3.11
LABEL maintainer="Dalton Hubble <[email protected]>"
RUN apk -U add dnsmasq curl
COPY tftpboot /var/lib/tftpboot
Expand Down
30 changes: 22 additions & 8 deletions contrib/dnsmasq/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
VERSION=$(shell git rev-parse HEAD)

IMAGE_REPO=poseidon/dnsmasq
QUAY_REPO=quay.io/poseidon/dnsmasq
LOCAL_REPO=poseidon/dnsmasq
IMAGE_REPO=quay.io/poseidon/dnsmasq

.PHONY: all
all: docker-image
Expand All @@ -11,14 +11,28 @@ all: docker-image
tftp:
@$(DIR)/get-tftp-files

.PHONY: image
image:
@buildah bud -t $(LOCAL_REPO):$(VERSION) .
@buildah tag $(LOCAL_REPO):$(VERSION) $(LOCAL_REPO):latest

.PHONY: push
push:
@buildah tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):$(VERSION)
@buildah tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):latest
@buildah push docker://$(IMAGE_REPO):$(VERSION)
@buildah push docker://$(IMAGE_REPO):latest

# for travis-only

.PHONY: docker-image
docker-image: tftp
@sudo docker build --rm=true -t $(IMAGE_REPO):$(VERSION) .
@sudo docker tag $(IMAGE_REPO):$(VERSION) $(IMAGE_REPO):latest
@sudo docker build --rm=true -t $(LOCAL_REPO):$(VERSION) .
@sudo docker tag $(LOCAL_REPO):$(VERSION) $(LOCAL_REPO):latest

.PHONY: docker-push
docker-push:
@sudo docker tag $(IMAGE_REPO):$(VERSION) $(QUAY_REPO):latest
@sudo docker tag $(IMAGE_REPO):$(VERSION) $(QUAY_REPO):$(VERSION)
@sudo docker push $(QUAY_REPO):latest
@sudo docker push $(QUAY_REPO):$(VERSION)
@sudo docker tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):latest
@sudo docker tag $(LOCAL_REPO):$(VERSION) $(IMAGE_REPO):$(VERSION)
@sudo docker push $(IMAGE_REPO):latest
@sudo docker push $(IMAGE_REPO):$(VERSION)

0 comments on commit 81341e4

Please sign in to comment.