Update Dockerfile to use go mod and golang 1.12

This commit is contained in:
Adrian Gallagher
2019-02-27 17:52:37 +11:00
parent e000a8d6c7
commit 81852f2e01
2 changed files with 4 additions and 6 deletions

View File

@@ -1,9 +1,7 @@
FROM golang:1.10 as build
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
FROM golang:1.12 as build
WORKDIR /go/src/github.com/thrasher-/gocryptotrader
COPY Gopkg.* ./
RUN dep ensure -vendor-only
COPY . .
RUN GO111MODULE=on go mod vendor
RUN mv -vn config_example.json config.json \
&& GOARCH=386 GOOS=linux CGO_ENABLED=0 go build . \
&& mv gocryptotrader /go/bin/gocryptotrader

View File

@@ -5,11 +5,11 @@ services:
web:
build: ./web
depends_on:
- cli
- daemon
ports:
- "9051:80"
cli:
daemon:
build: .
ports:
- "9050:9050"