blob: e0147030f6c2cfb9f79abba81132a3856f9a4b3b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
FROM alpine:3.18 as builder
RUN apk update && apk upgrade && \
apk add go git
RUN git clone https://github.com/terminaldweller/sms-webhook
WORKDIR /sms-webhook
COPY go.sum go.mod /sms-webhook/
COPY *.go /sms-webhook/
RUN go mod download
ENV CGO_ENABLED=0
RUN go build
FROM alpine:3.18 as certbuilder
RUN apk add openssl
WORKDIR /certs
RUN openssl req -nodes -new -x509 -subj="/C=US/ST=Denial/L=springfield/O=Dis/CN=sms-webhook" -keyout server.key -out server.cert
FROM alpine:3.18
COPY --from=certbuilder /certs /certs
COPY --from=builder /sms-webhook/sms-webhook /sms-webhook/
ENTRYPOINT ["/sms-webhook/sms-webhook"]
|