-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
17 lines (15 loc) · 611 Bytes
/
Copy pathDockerfile
File metadata and controls
17 lines (15 loc) · 611 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM golang:alpine as golang
WORKDIR /go/src/skarn
COPY . .
RUN apk add --no-cache git libc-dev musl-dev build-base gcc ca-certificates \
&& export VCS_REF=$(git describe --tags) \
&& echo $VCS_REF \
&& go get -u github.com/rakyll/statik \
&& $GOPATH/bin/statik -src="./www/" \
&& go get -u . \
&& CGO_ENABLED=1 go build -ldflags "-s -w -X main.Version=$VCS_REF" .
FROM alpine
COPY --from=golang /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=golang /go/src/skarn/skarn /app/skarn
VOLUME /data
ENTRYPOINT ["/app/skarn", "--port", "80", "--config", "/data/config.json"]