Merge pull request #645 from justincormack/check-config

Add check-config container and test
This commit is contained in:
Justin Cormack 2016-10-28 12:53:17 +01:00 committed by GitHub
commit 6254e3b541
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,4 @@
FROM alpine:3.4
RUN apk update && apk upgrade && apk add --no-cache bash
ADD https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh /usr/bin/check-config.sh
ENTRYPOINT ["/bin/bash", "/usr/bin/check-config.sh"]

View File

@ -0,0 +1,31 @@
.PHONY: tag push
BASE=alpine:3.4
IMAGE=check-config
default: push
hash:
docker pull $(BASE)
tar cf - Dockerfile | docker build --no-cache -t $(IMAGE):build -
docker run --entrypoint=/bin/sh $(IMAGE):build -c 'cat /usr/bin/check-config.sh /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
push: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
docker tag $(IMAGE):build mobylinux/$(IMAGE):latest && \
docker push mobylinux/$(IMAGE):$(shell cat hash) && \
docker push mobylinux/$(IMAGE):latest)
docker rmi $(IMAGE):build
rm -f hash
tag: hash
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build
rm -f hash
clean:
rm -f hash
.DELETE_ON_ERROR:

View File

@ -3,6 +3,7 @@
set -ex
ifconfig
docker version
docker info
docker ps
docker pull alpine
@ -12,3 +13,4 @@ wget -O - -q localhost/hostname
docker kill webserver
docker rm webserver
docker swarm init
docker run mobylinux/check-config