-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds docker changes for cli framework.
- Loading branch information
Showing
9 changed files
with
67 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,40 @@ | ||
FROM golang:1.10.3-alpine | ||
|
||
ARG tag | ||
# -*- mode: dockerfile -*- | ||
# | ||
# A multi-stage Dockerfile that builds a Linux target then creates a small | ||
# final image for deployment. | ||
|
||
# | ||
# STAGE 1 | ||
# | ||
# Uses a Go image to build a release binary. | ||
# | ||
FROM golang:1.10.3-alpine AS builder | ||
ARG tag=latest | ||
ENV DOCKER_TAG=$tag | ||
|
||
RUN apk update | ||
RUN apk --no-cache add git make tar bash curl alpine-sdk su-exec | ||
RUN go get -u github.com/golang/dep/... && mv /go/bin/dep /usr/local/bin/dep | ||
|
||
ADD . /go/src/github.com/alpacahq/marketstore | ||
WORKDIR /go/src/github.com/alpacahq/marketstore | ||
RUN apk --no-cache add git make gcc g++ | ||
RUN go get -u github.com/golang/dep/... | ||
WORKDIR /go/src/github.com/alpacahq/marketstore/ | ||
ADD ./ ./ | ||
RUN dep ensure -vendor-only | ||
RUN make install plugins | ||
|
||
RUN make configure all 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 alpine:latest | ||
RUN apk --no-cache add ca-certificates | ||
WORKDIR / | ||
COPY --from=builder /go/bin/marketstore /bin/ | ||
COPY --from=builder /go/bin/*.so /bin/ | ||
|
||
COPY entrypoint.sh /bin/ | ||
RUN chmod +x /bin/entrypoint.sh | ||
ENTRYPOINT ["/bin/entrypoint.sh"] | ||
RUN ["marketstore", "init"] | ||
RUN mv mkts.yml etc/ | ||
VOLUME /data | ||
EXPOSE 5993 | ||
|
||
CMD marketstore | ||
ENTRYPOINT ["marketstore"] | ||
CMD ["start", "--config", "etc/mkts.yml"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters