-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (20 loc) · 760 Bytes
/
Dockerfile
File metadata and controls
27 lines (20 loc) · 760 Bytes
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
FROM golang:1.14-alpine AS build
RUN apk add --no-cache ca-certificates git
WORKDIR /go/src/github.com/RocketChat/statuscentral
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o statuscentral ./cmd/server
FROM scratch as runtime
ARG GIN_MODE=release
ARG PORT=5000
ENV GIN_MODE=${GIN_MODE}
ENV PORT=${PORT}
WORKDIR /usr/local/statuscentral
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /go/src/github.com/RocketChat/statuscentral/statuscentral .
COPY --from=build /go/src/github.com/RocketChat/statuscentral/templates templates
COPY --from=build /go/src/github.com/RocketChat/statuscentral/static static
EXPOSE ${PORT}
ENTRYPOINT ["./statuscentral"]