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

Commit

Permalink
rename Rockerfiles and use semver aliases rocker feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuriy Bogdanov committed Sep 15, 2015
1 parent 67039d2 commit 545d3ff
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 32 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,7 @@ test: fmtcheck
@ go get -v github.com/constabulary/gb/...
gb test compose/...

version:
@echo $(VERSION)

.PHONY: clean build_image test fmtcheck
25 changes: 23 additions & 2 deletions Rockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,30 @@
# rocker is an extensible Dockerfile builder tool
FROM dockerhub.grammarly.io/golang-1.4.2-cross:v2

REQUIRE Version

ADD . /src
WORKDIR /src

TAG --no-alias rocker-compose-build:latest
RUN \
TIME=$(date "+%Y-%m-%d %H:%M GMT") \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOPATH=/src:/src/vendor \
go build \
-a -installsuffix cgo \
-ldflags "-X main.Version '{{ .Version }}' -X main.GitCommit '$commit' -X main.GitBranch '$branch' -X main.BuildTime '$TIME'" \
-v -o /bin/rocker-compose src/cmd/rocker-compose/main.go

EXPORT /bin/rocker-compose

#========

FROM alpine:3.2

RUN apk --update add bash

RUN mkdir -p /opt/rocker-compose/bin
IMPORT rocker-compose /opt/rocker-compose/bin

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

# ATTACH ["bash"]
PUSH --semver dockerhub.grammarly.io/rocker-compose:{{ .Version }}
10 changes: 10 additions & 0 deletions Rockerfile.build-cross
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Yeah, we have a tool called 'rocker' that is not open sourced yet.
# rocker is an extensible Dockerfile builder tool
FROM dockerhub.grammarly.io/golang-1.4.2-cross:v2

ADD . /src
WORKDIR /src

TAG --no-alias rocker-compose-build:latest

# ATTACH ["bash"]
30 changes: 0 additions & 30 deletions Rockerfile.exec

This file was deleted.

0 comments on commit 545d3ff

Please sign in to comment.