mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Update ca-certificates to use new Alpine base image
This is what the other images should look like in future. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
edfac0e8fb
commit
26f7d6ebdd
@ -1,6 +1,6 @@
|
|||||||
FROM alpine:3.5 as alpine
|
FROM linuxkit/alpine:f0169b60fb260d74025496ae6fd93213fecaba8f as alpine
|
||||||
|
|
||||||
RUN apk update && apk upgrade -a && apk add --no-cache ca-certificates
|
RUN apk add ca-certificates
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
ENTRYPOINT []
|
ENTRYPOINT []
|
||||||
|
@ -1,34 +1,13 @@
|
|||||||
.PHONY: tag push
|
.PHONY: tag push
|
||||||
|
|
||||||
BASE=alpine:3.5
|
|
||||||
IMAGE=ca-certificates
|
IMAGE=ca-certificates
|
||||||
|
|
||||||
SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
||||||
|
|
||||||
default: push
|
default: push
|
||||||
|
|
||||||
hash: Dockerfile
|
tag: Dockerfile
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
docker build --network=none -t linuxkit/$(IMAGE):$(HASH) .
|
||||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
||||||
CONTAINER=$$(docker create $(IMAGE):build /dev/null); \
|
|
||||||
mkdir tmp && docker export $${CONTAINER} | tar xf - -C tmp && \
|
|
||||||
cat tmp/etc/ssl/certs/ca-certificates.crt | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > $@ && \
|
|
||||||
rm -rf tmp && docker rm $${CONTAINER}
|
|
||||||
|
|
||||||
push: hash
|
push: tag
|
||||||
docker pull linuxkit/$(IMAGE):$(shell cat hash) || \
|
docker pull linuxkit/$(IMAGE):$(HASH) || docker push linuxkit/$(IMAGE):$(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 tmp
|
|
||||||
|
|
||||||
.DELETE_ON_ERROR:
|
|
||||||
|
Loading…
Reference in New Issue
Block a user