Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Rockerfile version labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Bogdanov committed Sep 30, 2015
1 parent 96340db commit 46ab7e1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Rockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# rocker is an extensible Dockerfile builder tool
FROM dockerhub.grammarly.io/golang-1.4.2-cross:v2

REQUIRE Version
{{ assert .Version }}
{{ $stable := "0.1.2" }}
{{ $beta := "0.1.3" }}

ADD . /src
WORKDIR /src
Expand Down Expand Up @@ -40,4 +42,11 @@ ENV PATH=/opt/rocker-compose/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/b

CMD ["/opt/rocker-compose/bin/rocker-compose"]

PUSH --semver dockerhub.grammarly.io/rocker-compose:{{ .Version }}

PUSH dockerhub.grammarly.io/rocker-compose:{{ .Version }}

{{ if hasPrefix .Version $stable }}
PUSH dockerhub.grammarly.io/rocker-compose:stable
{{ else if hasPrefix .Version $beta }}
PUSH dockerhub.grammarly.io/rocker-compose:beta
{{ end }}

0 comments on commit 46ab7e1

Please sign in to comment.