forked from pathwar/pathwar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 908 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (20 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# builder
FROM golang:1.14-alpine as builder
RUN apk --no-cache --update add nodejs-npm make gcc g++ musl-dev openssl-dev git perl-utils
RUN go get github.com/gobuffalo/packr/v2/packr2
ENV GO111MODULE=on GOPROXY=https://proxy.golang.org,direct
COPY go.mod go.sum /go/src/pathwar.land/
WORKDIR /go/src/pathwar.land
RUN go mod download
COPY . .
WORKDIR /go/src/pathwar.land/go
RUN make packr
RUN make install
# runtime
FROM alpine:3.10
RUN apk --no-cache --update add openssl wget bash
RUN wget https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh && chmod +x wait-for-it.sh
COPY --from=builder /go/bin/pathwar /bin/pathwar
ENTRYPOINT ["/bin/pathwar"]
CMD ["api", "server"]
EXPOSE 8000 9111