init
This commit is contained in:
commit
4609d34e59
5 changed files with 214 additions and 0 deletions
24
Dockerfile
Normal file
24
Dockerfile
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
FROM golang:alpine AS builder
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o /out/pp .
|
||||
|
||||
FROM alpine
|
||||
|
||||
RUN apk add --no-cache tzdata ca-certificates
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /out/pp /usr/local/bin/pp
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --start-period=5s --start-interval=1s CMD \
|
||||
test "$(wget -q -O - http://127.0.0.1/health)" = "ok"
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/pp"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue