mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
alpine: Record image has in versions file
Otherwise the only record is if the pusher happens to remember to put it in the commit message (tollerable) or the github PR (not great). Also add the same show-tag target as `pkg/package.mk` supports, although with a very different implementation. The actual hash is unchanged from the previous commit. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
parent
00a2f2ac8c
commit
28905c57cc
@ -6,6 +6,9 @@ BASE=alpine:3.6
|
||||
|
||||
default: push
|
||||
|
||||
show-tag:
|
||||
@sed -n -e '1s/# \(.*\/.*:[0-9a-f]\{40\}\)/\1/p;q' versions
|
||||
|
||||
hash: Dockerfile Makefile packages
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
||||
docker build --no-cache -t $(IMAGE):build .
|
||||
@ -15,7 +18,8 @@ push: hash
|
||||
DOCKER_CONTENT_TRUST=1 docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \
|
||||
(docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \
|
||||
DOCKER_CONTENT_TRUST=1 docker push $(ORG)/$(IMAGE):$(shell cat hash))
|
||||
docker run --rm $(IMAGE):build find /mirror -name '*.apk' -exec basename '{}' .apk \; | sort | (echo '# automatically generated list of installed packages'; cat -) > versions
|
||||
echo "# $(ORG)/$(IMAGE):$(shell cat hash)" > versions
|
||||
docker run --rm $(IMAGE):build find /mirror -name '*.apk' -exec basename '{}' .apk \; | sort | (echo '# automatically generated list of installed packages'; cat -) >> versions
|
||||
docker rmi $(IMAGE):build
|
||||
rm -f hash
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
# linuxkit/alpine:3744607156e6b67e3e7d083b15be9e7722215e73
|
||||
# automatically generated list of installed packages
|
||||
abuild-3.0.0_rc2-r7
|
||||
alpine-baselayout-3.0.4-r0
|
||||
|
Loading…
Reference in New Issue
Block a user