mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-17 08:38:17 +00:00
This tags a base Alpine image with the packages we use by finding the has of the package install manifest and using that to tag the image on hub. Hub org needs changing, and not sure how this will work out yet. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
27 lines
984 B
Makefile
27 lines
984 B
Makefile
.PHONY: tag push
|
|
|
|
default: push
|
|
|
|
hash:
|
|
docker pull alpine:3.4
|
|
tar cf - Dockerfile | docker build --no-cache -t justincormack/moby-alpine-base:build -
|
|
rm -f hash
|
|
docker run justincormack/moby-alpine-base:build sha1sum /lib/apk/db/installed | sed 's/ .*//' > hash
|
|
|
|
push: hash
|
|
docker pull justincormack/moby-alpine-base:$(shell cat hash) || \
|
|
(docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:latest && \
|
|
docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:$(shell cat hash) && \
|
|
docker push justincormack/moby-alpine-base:$(shell cat hash) && \
|
|
docker push justincormack/moby-alpine-base:latest)
|
|
rm -f hash
|
|
|
|
tag: hash
|
|
docker pull justincormack/moby-alpine-base:$(shell cat hash) || \
|
|
(docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:latest && \
|
|
docker tag justincormack/moby-alpine-base:build justincormack/moby-alpine-base:$(shell cat hash))
|
|
rm -f hash
|
|
|
|
clean:
|
|
rm -f hash
|