1
0
mirror of https://github.com/alrayyes/docker-alpine-hugo-git-bash synced 2023-11-14 15:56:26 +00:00

testing labels

This commit is contained in:
Ryan 2017-09-16 01:19:16 +02:00
parent 28586ce324
commit dee9779097
2 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,15 @@ FROM alpine:latest
MAINTAINER Ryan Kes <ryan@andthensome.nl>
ADD VERSION .
ARG BUILD_DATE
ARG VCS_REF
ARG VCS_URL
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-url=$VCS_URL \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.schema-version="1.0.0-rc1"
ENV HUGO_VERSION 0.26
ENV HUGO_BINARY hugo_${HUGO_VERSION}_linux-64bit

8
hooks/build Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# $IMAGE_NAME var is injected into the build so the tag is correct.
docker build --build-arg VCS_REF=`git rev-parse — short HEAD` \
--build-arg VCS_URL=`git config --get remote.origin.url` \
--build-arg BUILD_DATE=`date -u +”%Y-%m-%dT%H:%M:%SZ”` \
-t $IMAGE_NAME .