forked from kplcloud/kplcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.client
27 lines (22 loc) · 886 Bytes
/
Dockerfile.client
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.13.0-alpine3.10 as build-env
ENV GO111MODULE=on
ENV BUILDPATH=github.com/kplcloud/kplcloud
ENV GOPROXY=https://goproxy.io
ENV GOPATH=/go
RUN mkdir -p /go/src/${BUILDPATH}
COPY ./ /go/src/${BUILDPATH}
RUN cd /go/src/${BUILDPATH} && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -v
RUN cd /go/src/${BUILDPATH}/cmd/client && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go install -v
FROM alpine:latest
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates \
curl \
&& update-ca-certificates 2>/dev/null || true
COPY --from=build-env /go/bin/kplcloud /go/bin/kplcloud
COPY ./static /go/bin/static
COPY ./database /go/bin/database
COPY --from=build-env /go/bin/client /go/bin/client
WORKDIR /go/bin/
CMD ["/go/bin/kplcloud", "start", "-p", ":8080", "-c", "/etc/kplcloud/app.cfg", "-k", "/etc/kplcloud/config.yaml"]