From 59721b3f703259407b4323cb36170b8584697dd3 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 25 Nov 2018 22:25:08 +0100 Subject: [PATCH] do docker --- .drone.yml | 18 ++++++++++++++++++ Dockerfile | 14 +++++++++++--- Makefile | 14 -------------- README.md | 4 ++++ 4 files changed, 33 insertions(+), 17 deletions(-) create mode 100644 .drone.yml delete mode 100644 Makefile create mode 100644 README.md diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..f839a38 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,18 @@ +--- +pipeline: + + build: + image: plugins/docker + repo: reg.zknt.org/zknt/alpine + tags: + - 2.8.1 + secrets: [ docker_username, docker_password ] + + notify: + image: drillster/drone-email + host: mx01.mta.zknt.org + from: drone@zknt.org + secrets: [ email_username, email_password ] + +branches: + include: [ master ] diff --git a/Dockerfile b/Dockerfile index 3c8a3e3..1d58b42 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ -FROM scratch -ENV ALPINE_VERSION 3.8.0 +FROM alpine as build +ENV ALPINE_MIRROR https://uk.alpinelinux.org/alpine/v3.8/releases +ENV ALPINE_VERSION 3.8.1 ENV ALPINE_ARCH x86_64 -ADD alpine-minirootfs-$ALPINE_VERSION-$ALPINE_ARCH.tar.gz / +WORKDIR /root +RUN apk add --no-cache curl &&\ + curl -LO ${ALPINE_MIRROR}/${ALPINE_ARCH}/alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz &&\ + mkdir /dest &&\ + tar -C /dest -xvzf alpine-minirootfs-${ALPINE_VERSION}-${ALPINE_ARCH}.tar.gz + +FROM scratch +COPY --from=build /dest / CMD ["/bin/sh"] diff --git a/Makefile b/Makefile deleted file mode 100644 index b873e2b..0000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -ALPINE_VERSION=3.8.1 -ALPINE_MIRROR=https://uk.alpinelinux.org/alpine/v3.8/releases -ALPINE_ARCH=x86_64 - -image: - curl -LO $(ALPINE_MIRROR)/$(ALPINE_ARCH)/alpine-minirootfs-$(ALPINE_VERSION)-$(ALPINE_ARCH).tar.gz - curl -LO $(ALPINE_MIRROR)/$(ALPINE_ARCH)/alpine-minirootfs-$(ALPINE_VERSION)-$(ALPINE_ARCH).tar.gz.asc - gpg --verify alpine-minirootfs-$(ALPINE_VERSION)-$(ALPINE_ARCH).tar.gz.asc alpine-minirootfs-$(ALPINE_VERSION)-$(ALPINE_ARCH).tar.gz &&\ - sed -i 's/^ENV ALPINE_VERSION.*/ENV ALPINE_VERSION $(ALPINE_VERSION)/' Dockerfile &&\ - sed -i 's/^ENV ALPINE_ARCH.*/ENV ALPINE_ARCH $(ALPINE_ARCH)/' Dockerfile &&\ - docker build . -t reg.zknt.org/zknt/alpine:$(ALPINE_VERSION) - -push: - docker push reg.zknt.org/zknt/alpine:$(ALPINE_VERSION) diff --git a/README.md b/README.md new file mode 100644 index 0000000..31433c4 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +stock alpine +============ + +Last update: 2018-11-26