Skip to content

Commit

Permalink
Add hooks to label image
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibo Delor committed Sep 1, 2016
1 parent 6429fa5 commit 8536f54
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions 1.10.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM debian:jessie
MAINTAINER Tibo Delor "delor.thibault@gmail.com"

ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.license="MIT" \
org.label-schema.name="Docker Rust" \
org.label-schema.url="https://hub.docker.com/r/thibaultdelor/docker-rust" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-type="Git" \
org.label-schema.vcs-url="https://github.com/thibaultdelor/docker-rust"

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -qqy curl ca-certificates build-essential \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
11 changes: 11 additions & 0 deletions 1.11.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
FROM debian:jessie
MAINTAINER Tibo Delor "delor.thibault@gmail.com"

ARG BUILD_DATE
ARG VCS_REF
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.license="MIT" \
org.label-schema.name="Docker Rust" \
org.label-schema.url="https://hub.docker.com/r/thibaultdelor/docker-rust" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-type="Git" \
org.label-schema.vcs-url="https://github.com/thibaultdelor/docker-rust"

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -qqy curl ca-certificates build-essential \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
3 changes: 3 additions & 0 deletions hooks/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh

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 .

0 comments on commit 8536f54

Please sign in to comment.