This commit is contained in:
Bertrand Gouny 2017-07-06 14:40:23 +02:00
parent 7fcab02dab
commit 05e32fe330
2 changed files with 16 additions and 11 deletions

View File

@ -1,9 +1,7 @@
NAME = osixia/keepalived NAME = osixia/keepalived
VERSION = 1.3.5-1-1 VERSION = 1.3.5-1
.PHONY: all build build-nocache test tag_latest release .PHONY: build build-nocache test tag-latest push push-latest release git-tag-version
all: build
build: build:
docker build -t $(NAME):$(VERSION) --rm image docker build -t $(NAME):$(VERSION) --rm image
@ -14,10 +12,17 @@ build-nocache:
test: test:
env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats env NAME=$(NAME) VERSION=$(VERSION) bats test/test.bats
tag_latest: tag-latest:
docker tag $(NAME):$(VERSION) $(NAME):latest docker tag $(NAME):$(VERSION) $(NAME):latest
release: build test tag_latest push:
@if ! docker images $(NAME) | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi docker push $(NAME):$(VERSION)
docker push $(NAME)
@echo "*** Don't forget to run 'twgit release/hotfix finish' :)" push-latest:
docker push $(NAME):latest
release: build test tag_latest push push_latest
git-tag-version: release
git tag -a v$(VERSION) -m "v$(VERSION)"
git push origin v$(VERSION)

View File

@ -1,10 +1,10 @@
# Use osixia/light-baseimage # Use osixia/light-baseimage
# sources: https://github.com/osixia/docker-light-baseimage # sources: https://github.com/osixia/docker-light-baseimage
FROM osixia/alpine-light-baseimage:0.1.2 FROM osixia/alpine-light-baseimage:0.1.4
MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net> MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net>
# Keepalived version # Keepalived version
ENV KEEPALIVED_VERSION 1.3.5 ARG KEEPALIVED_VERSION=1.3.5
RUN addgroup -S keepalived_script && adduser -D -S -G keepalived_script keepalived_script RUN addgroup -S keepalived_script && adduser -D -S -G keepalived_script keepalived_script