mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
pkg: Roll the openntpd package from linuxkit/alpine
Also make the HUB org/registry build time configurable. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
7270e125d4
commit
add7b63276
@ -1,13 +1,18 @@
|
|||||||
FROM linuxkit/alpine:c5021a113803f7608e3908014d316c3490183d0b@sha256:4c7a80173c71ca5019dc56f40442b3a8345f141dd46593bd1fe6d130294d07cb AS mirror
|
FROM linuxkit/alpine:6336329f15b4166514782eaa555cf0ffd35c519c@sha256:f6c2ce92910b1d6e4e5557850a554f4a3ae9f66c1e89ad86a24d6c6e550f165e AS mirror
|
||||||
|
|
||||||
FROM alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8
|
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
|
||||||
COPY --from=mirror /etc/apk/repositories /etc/apk/repositories
|
RUN apk add --no-cache --initdb -p /out \
|
||||||
COPY --from=mirror /etc/apk/keys /etc/apk/keys/
|
alpine-baselayout \
|
||||||
COPY --from=mirror /mirror /mirror/
|
busybox \
|
||||||
|
musl \
|
||||||
RUN apk add --no-cache openntpd && true
|
openntpd \
|
||||||
RUN rm -rf /mirror /etc/apk/repositories /etc/apk/keys
|
&& true
|
||||||
|
RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
||||||
COPY . .
|
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
ENTRYPOINT []
|
||||||
|
CMD []
|
||||||
|
WORKDIR /
|
||||||
|
COPY --from=mirror /out/ /
|
||||||
|
COPY etc/ /etc/
|
||||||
CMD ["/usr/sbin/ntpd", "-d", "-s"]
|
CMD ["/usr/sbin/ntpd", "-d", "-s"]
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
.PHONY: tag push
|
.PHONY: tag push
|
||||||
default: push
|
default: push
|
||||||
|
|
||||||
|
ORG?=linuxkit
|
||||||
IMAGE=openntpd
|
IMAGE=openntpd
|
||||||
DEPS=Dockerfile etc/ntpd.conf
|
DEPS=Dockerfile etc/ntpd.conf
|
||||||
|
|
||||||
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}')
|
||||||
|
|
||||||
tag: $(DEPS)
|
tag: $(DEPS)
|
||||||
docker build --squash --no-cache --network=none -t linuxkit/$(IMAGE):$(HASH) .
|
docker build --squash --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) .
|
||||||
|
|
||||||
push: tag
|
push: tag
|
||||||
docker pull linuxkit/$(IMAGE):$(HASH) || \
|
docker pull $(ORG)/$(IMAGE):$(HASH) || \
|
||||||
docker push linuxkit/$(IMAGE):$(HASH)
|
docker push $(ORG)/$(IMAGE):$(HASH)
|
||||||
|
Loading…
Reference in New Issue
Block a user