From 344c7eb38a646191cdeb03fe06c15a2016813cd5 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 8 Jul 2020 22:19:04 +0200 Subject: [PATCH] initial commit --- Dockerfile | 15 +++++++++++++++ README.md | 7 +++++++ hooks/build | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 hooks/build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..92c4ddc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM alpine:3.12.0 + +ARG BUILD_DATE +ARG VCS_REF + +LABEL description="Alpine-based image containing simply rsync" + +LABEL org.label-schema.build-date=$BUILD_DATE \ + org.label-schema.vcs-url="https://github.com/wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf/docker-alpine-rsync.git" \ + org.label-schema.vcs-ref=$VCS_REF \ + org.label-schema.license=GPL-3.0 + +RUN apk update && apk -U upgrade --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing +RUN apk add --no-cache ca-certificates rsync openssh-client --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing && \ + rm -rf /var/cache/apk/* diff --git a/README.md b/README.md new file mode 100644 index 0000000..69316ea --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# docker-alpine-rf + +This repo provides the Dockerfile for creating an alpine-based rsync image. + +## What you get +* updated alpine[`:3.12.0`](https://hub.docker.com/_/alpine) image +* rsync diff --git a/hooks/build b/hooks/build new file mode 100644 index 0000000..4c69a76 --- /dev/null +++ b/hooks/build @@ -0,0 +1,10 @@ +#!/bin/bash + +# as per https://github.com/rossf7/label-schema-automated-build + +# $IMAGE_NAME var is injected into the build so the tag is correct. + +echo "Build hook running" +docker build --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + -t $IMAGE_NAME .