mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 04:28:20 +00:00
Merge pull request #645 from justincormack/check-config
Add check-config container and test
This commit is contained in:
commit
6254e3b541
4
alpine/base/check-config/Dockerfile
Normal file
4
alpine/base/check-config/Dockerfile
Normal 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"]
|
31
alpine/base/check-config/Makefile
Normal file
31
alpine/base/check-config/Makefile
Normal 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:
|
@ -3,6 +3,7 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
ifconfig
|
ifconfig
|
||||||
|
docker version
|
||||||
docker info
|
docker info
|
||||||
docker ps
|
docker ps
|
||||||
docker pull alpine
|
docker pull alpine
|
||||||
@ -12,3 +13,4 @@ wget -O - -q localhost/hostname
|
|||||||
docker kill webserver
|
docker kill webserver
|
||||||
docker rm webserver
|
docker rm webserver
|
||||||
docker swarm init
|
docker swarm init
|
||||||
|
docker run mobylinux/check-config
|
||||||
|
Loading…
Reference in New Issue
Block a user