Initial commit
This commit is contained in:
commit
80602afe58
14 files changed
+508
No files matched your search
+19
@@ -0,0 +1,19 @@
|
||||
### STAGE 1.a: Prepare certs ###
|
||||
FROM alpine:latest as certs
|
||||
RUN apk --update add ca-certificates
|
||||
|
||||
### STAGE 1.b: Build ###
|
||||
FROM golang as go-build
|
||||
WORKDIR /root
|
||||
COPY go.mod go.sum ./
|
||||
# install packages
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go build -tags timetzdata template
|
||||
|
||||
### Stage 2: Run ###
|
||||
FROM scratch
|
||||
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
||||
COPY --from=go-build /root/template /usr/bin/template
|
||||
ENTRYPOINT ["template"]
|
||||
Reference in new issue
Block a user