Files
linuxkit/pkg/sshd/Makefile
Rolf Neugebauer 0a0786d49e pkg: Update packages to push to linuxkit hub org
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-04-12 21:28:17 +01:00

30 lines
760 B
Makefile

.PHONY: tag push
BASE=alpine:edge
IMAGE=sshd
default: push
hash: Dockerfile etc/ssh/sshd_config usr/bin/ssh.sh etc/motd
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
docker run --rm $(IMAGE):build sh -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > $@
push: hash
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
(docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \
docker push linuxkit/$(IMAGE):$(shell cat hash))
docker rmi $(IMAGE):build
rm -f hash
tag: hash
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash)
docker rmi $(IMAGE):build
rm -f hash
clean:
rm -f hash
.DELETE_ON_ERROR: