forked from alpacahq/marketstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (36 loc) · 834 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#
# STAGE 1
#
# Uses a Go image to build a release binary.
#
FROM ubuntu:18.04 as builder
ARG tag=latest
ENV DOCKER_TAG=$tag
ENV GO111MODULE=on
ENV GOPATH=/go
#RUN apk --no-cache add git make gcc g++
RUN apt update
RUN apt install -y golang gcc g++ make wget git
WORKDIR /go/src/github.com/alpacahq/marketstore/
ADD ./ ./
RUN make vendor
RUN make install plugins
#
# STAGE 2
#
# Use a tiny base image (alpine) and copy in the release target. This produces
# a very small output image for deployment.
#
FROM ubuntu:18.04
RUN apt update
RUN apt install -y ca-certificates tzdata
WORKDIR /
COPY --from=builder /go/bin/marketstore /bin/
COPY --from=builder /go/bin/*.so /bin/
ENV GOPATH=/
RUN ["marketstore", "init"]
RUN mv mkts.yml /etc/
VOLUME /data
EXPOSE 5993
ENTRYPOINT ["marketstore"]
CMD ["start", "--config", "/etc/mkts.yml"]