do docker
This commit is contained in:
parent
a49490910b
commit
59721b3f70
|
@ -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 ]
|
14
Dockerfile
14
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"]
|
||||
|
|
14
Makefile
14
Makefile
|
@ -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)
|
Loading…
Reference in New Issue