~ancarda/tls-redirector

ref: 5f0b9ad56965a4fa1f18e3734f574c80e6e7340f tls-redirector/Dockerfile -rw-r--r-- 440 bytes
5f0b9ad5Mark Dain Add a basic Docker healthcheck a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM golang:1.15.6-alpine3.12 AS builder
WORKDIR /go/src/git.sr.ht/~ancarda/tls-redirector
RUN apk add git binutils
COPY go.* ./
RUN go mod download
COPY . ./
RUN go generate ./... && go build . && strip tls-redirector

FROM alpine:3.12.3
RUN apk add curl
COPY --from=builder /go/src/git.sr.ht/~ancarda/tls-redirector/tls-redirector .
EXPOSE 80
CMD ["./tls-redirector"]
HEALTHCHECK --interval=10s CMD curl --fail http://localhost || exit 1