mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-05 11:27:45 +00:00
Signed-off-by: Avi Deitcher <avi@deitcher.net> Fix spaces after commas Remove MAINTAINER Signed-off-by: Avi Deitcher <avi@deitcher.net> Simplify swap.yml example to remove files section Signed-off-by: Avi Deitcher <avi@deitcher.net> Switch swap.sh to sh from bash and remove bash from image Signed-off-by: Avi Deitcher <avi@deitcher.net> Replace fallocate with dd and update calculation function to support it Signed-off-by: Avi Deitcher <avi@deitcher.net> Fix indentation Signed-off-by: Avi Deitcher <avi@deitcher.net> Change link to swap to just swap.sh Signed-off-by: Avi Deitcher <avi@deitcher.net> Fix indent Signed-off-by: Avi Deitcher <avi@deitcher.net>
31 lines
729 B
Makefile
31 lines
729 B
Makefile
# copy from mount
|
|
.PHONY: tag push clean
|
|
|
|
BASE=alpine:3.5
|
|
IMAGE=linuxkit/swap
|
|
|
|
default: push
|
|
|
|
hash: Dockerfile swap.sh
|
|
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
|
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
docker run --rm --entrypoint /bin/sh $(IMAGE):build -c "cat $^ /lib/apk/db/installed | sha1sum" | sed 's/ .*//' > $@
|
|
|
|
push: hash
|
|
docker pull $(IMAGE):$(shell cat hash) || \
|
|
(docker tag $(IMAGE):build $(IMAGE):$(shell cat hash) && \
|
|
docker push $(IMAGE):$(shell cat hash))
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
tag: hash
|
|
docker pull $(IMAGE):$(shell cat hash) || \
|
|
docker tag $(IMAGE):build $(IMAGE):$(shell cat hash)
|
|
docker rmi $(IMAGE):build
|
|
rm -f hash
|
|
|
|
clean:
|
|
rm -f hash
|
|
|
|
.DELETE_ON_ERROR:
|