mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
commit
b4a3e2e0da
@ -1,21 +0,0 @@
|
|||||||
FROM alpine:3.5
|
|
||||||
RUN \
|
|
||||||
apk update && apk upgrade && \
|
|
||||||
apk add \
|
|
||||||
curl \
|
|
||||||
gcc \
|
|
||||||
groff \
|
|
||||||
make \
|
|
||||||
musl-dev \
|
|
||||||
&& true
|
|
||||||
|
|
||||||
COPY . /
|
|
||||||
|
|
||||||
ENV VERSION=mksh-R54
|
|
||||||
|
|
||||||
RUN curl -O -sSL https://github.com/MirBSD/mksh/archive/$VERSION.tar.gz
|
|
||||||
RUN zcat $VERSION.tar.gz | tar xvf -
|
|
||||||
|
|
||||||
ENV LDFLAGS=-static
|
|
||||||
|
|
||||||
RUN cd mksh-$VERSION && sh ./Build.sh && strip mksh && install -c -s -o root -g bin -m 555 mksh /bin/mksh
|
|
@ -1,29 +0,0 @@
|
|||||||
.PHONY: tag push
|
|
||||||
|
|
||||||
BASE=alpine:3.5
|
|
||||||
IMAGE=mksh
|
|
||||||
|
|
||||||
default: push
|
|
||||||
|
|
||||||
hash: Dockerfile
|
|
||||||
DOCKER_CONTENT_TRUST=1 docker pull $(BASE)
|
|
||||||
tar cf - $^ | docker build --no-cache -t $(IMAGE):build -
|
|
||||||
docker run --rm --entrypoint sh $(IMAGE):build -c 'cat /Dockerfile /lib/apk/db/installed | sha1sum' | sed 's/ .*//' > hash
|
|
||||||
|
|
||||||
push: hash
|
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
||||||
(docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash) && \
|
|
||||||
docker push mobylinux/$(IMAGE):$(shell cat hash))
|
|
||||||
docker rmi $(IMAGE):build
|
|
||||||
rm -f hash
|
|
||||||
|
|
||||||
tag: hash
|
|
||||||
docker pull mobylinux/$(IMAGE):$(shell cat hash) || \
|
|
||||||
docker tag $(IMAGE):build mobylinux/$(IMAGE):$(shell cat hash)
|
|
||||||
docker rmi $(IMAGE):build
|
|
||||||
rm -f hash
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f hash
|
|
||||||
|
|
||||||
.DELETE_ON_ERROR:
|
|
Loading…
Reference in New Issue
Block a user