Skip to content

Commit

Permalink
Adds Dockerfile and build_binaries script to help build binaries anyw…
Browse files Browse the repository at this point in the history
…here
  • Loading branch information
rrajagop committed Oct 24, 2018
1 parent a3c7d50 commit 826cc8a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:alpine as builder

RUN apk add --update git perl-utils bash

WORKDIR $GOPATH/src/github.com/thoughtworks/talisman

RUN go get github.com/mitchellh/gox

VOLUME [$GOPATH/src/github.com/thoughtworks/talisman]

CMD ["/bin/bash", "./build"]


2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
VERSION=$(git describe --tags HEAD)
export GO111MODULE=on
gox -os="linux darwin windows" -arch="386 amd64" -ldflags="-X main.Version=${VERSION}"
Expand Down
6 changes: 6 additions & 0 deletions build_binaries.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#/bin/bash
docker image build --rm -t build_talisman .
docker container run --rm -v `pwd`:/go/src/github.com/thoughtworks/talisman -it --name build_talisman build_talisman
# need to find a good way to make sure that the binaries and the checksum file are not owned by root
# sudo chown $USER:$USER talisman_{l,d,w}*
# sudo chown $USER:$USER checksums

0 comments on commit 826cc8a

Please sign in to comment.