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

Commit

Permalink
Merge pull request #8 from Financial-Times/Exe_rename
Browse files Browse the repository at this point in the history
Rename EXE to project name
  • Loading branch information
carlosroman committed Sep 22, 2016
2 parents 737c789 + 23b7a52 commit 12d9e55
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM alpine:3.4

FROM alpine:3.3
ARG PROJECT=alphaville-series-rw-neo4j

ADD . /alphaville-series-rw-neo4j/
ADD . /${PROJECT}/

RUN apk add --update bash \
&& apk --update add git bzr \
&& apk --update add go \
&& cd alphaville-series-rw-neo4j \
RUN apk add --no-cache bash \
&& apk --no-cache --virtual .build-dependencies add git go \
&& cd ${PROJECT} \
&& git fetch origin 'refs/tags/*:refs/tags/*' \
&& BUILDINFO_PACKAGE="github.com/Financial-Times/service-status-go/buildinfo." \
&& VERSION="version=$(git describe --tag --always 2> /dev/null)" \
Expand All @@ -17,15 +17,17 @@ RUN apk add --update bash \
&& LDFLAGS="-X '"${BUILDINFO_PACKAGE}$VERSION"' -X '"${BUILDINFO_PACKAGE}$DATETIME"' -X '"${BUILDINFO_PACKAGE}$REPOSITORY"' -X '"${BUILDINFO_PACKAGE}$REVISION"' -X '"${BUILDINFO_PACKAGE}$BUILDER"'" \
&& cd .. \
&& export GOPATH=/gopath \
&& REPO_PATH="github.com/Financial-Times/alphaville-series-rw-neo4j" \
&& mkdir -p $GOPATH/src/${REPO_PATH} \
&& mv alphaville-series-rw-neo4j/* $GOPATH/src/${REPO_PATH} \
&& REPO_ROOT="github.com/Financial-Times/" \
&& REPO_PATH="$REPO_ROOT/${PROJECT}" \
&& mkdir -p $GOPATH/src/${REPO_ROOT} \
&& mv ${PROJECT} $GOPATH/src/${REPO_ROOT} \
&& cd $GOPATH/src/${REPO_PATH} \
&& go get ./... \
&& cd $GOPATH/src/${REPO_PATH} \
&& go get -t ./... \
&& echo ${LDFLAGS} \
&& go build -ldflags="${LDFLAGS}" \
&& mv alphaville-series-rw-neo4j /app \
&& apk del go git bzr \
&& mv ${PROJECT} / \
&& apk del .build-dependencies \
&& rm -rf $GOPATH /var/cache/apk/*

CMD [ "/app" ]
CMD [ "/alphaville-series-rw-neo4j" ]

0 comments on commit 12d9e55

Please sign in to comment.