Files
gocryptotrader/Dockerfile
Adrian Gallagher 6b575dd925 Fixes Docker build
https://github.com/thrasher-/gocryptotrader/issues/162

Also enabled webserver so that communication can happen between the docker web and cli containers
2018-08-03 15:36:34 +10:00

16 lines
526 B
Docker

FROM golang:1.10 as build
RUN curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
WORKDIR /go/src/gocryptotrader
COPY . .
RUN dep ensure
RUN mv -vn config_example.json config.json \
&& GOARCH=386 GOOS=linux CGO_ENABLED=0 go install -v \
&& mv /go/bin/linux_386 /go/bin/gocryptotrader
FROM alpine:latest
RUN apk update && apk add --no-cache ca-certificates
COPY --from=build /go/bin/gocryptotrader /app/
COPY --from=build /go/src/gocryptotrader/config.json /app/
EXPOSE 9050
CMD ["/app/gocryptotrader"]