aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorGravatar Abhinav Gupta <mail@abhinavg.net> 2019-01-02 16:36:04 -0800
committerGravatar GitHub <noreply@github.com> 2019-01-02 16:36:04 -0800
commitfa1cf198a7c22a0f7537c565e36a19567bbde0d8 (patch)
tree05784d90af9d96ebdab015e08372c76a3cf1aac1 /Dockerfile
parent4f14effe2d5e01058696fc1038255d0b2dd54179 (diff)
downloadsally-fa1cf198a7c22a0f7537c565e36a19567bbde0d8.tar.gz
sally-fa1cf198a7c22a0f7537c565e36a19567bbde0d8.tar.zst
sally-fa1cf198a7c22a0f7537c565e36a19567bbde0d8.zip
Upgrade to Go 1.11 and use modules (#33)
This commit modernizes the repository organization a bit. In short, this, - Upgrades to Go 1.11. - Uses Go modules instead of Glide. - Drops errcheck, which we rarely use in our codebase internally. - Uses `./...` to run build, tests, etc. since that does not have to account for vendor anymore. - Drops `-installsuffix cgo` from the production build. This was a workaround for pre-1.10 versions of Go. See https://github.com/golang/go/issues/9344#issuecomment-69944514. - Uses a tools.go as recommended in [go-modules-by-example/tools][1] to pin to tool dependencies. - Uses `go run` instead of `go install`ing tools globally. [1]: https://github.com/go-modules-by-example/index/tree/master/010_tools Tested locally with `make docker-launch`.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile6
1 files changed, 3 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 8c06098..131220f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,12 @@
-FROM golang:1.7.5
+FROM golang:1.11
EXPOSE 8080
RUN \
curl -fsSLO https://get.docker.com/builds/Linux/x86_64/docker-latest.tgz && \
tar --strip-components=1 -xvzf docker-latest.tgz -C /usr/local/bin
+ENV GO111MODULE=on
RUN mkdir -p /go/src/go.uber.org/sally
WORKDIR /go/src/go.uber.org/sally
-ADD glide.yaml glide.lock /go/src/go.uber.org/sally/
-RUN go get -v github.com/Masterminds/glide && glide install
ADD . /go/src/go.uber.org/sally/
+RUN go mod vendor
CMD ["make", "run"]