mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
21 lines
414 B
Plaintext
21 lines
414 B
Plaintext
FROM golang:1.15-alpine as builder
|
|
|
|
RUN apk update && apk upgrade && \
|
|
apk add --no-cache bash git openssh curl
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod /go.sum /app/
|
|
RUN go mod download
|
|
|
|
COPY /src /app/
|
|
|
|
RUN CGO_ENABLED=0 go build -o /webhook
|
|
RUN CGO_ENABLED=0 go test -v
|
|
|
|
FROM alpine:3.10
|
|
|
|
COPY --from=builder /webhook /usr/local/bin/webhook
|
|
RUN chmod +x /usr/local/bin/webhook
|
|
|
|
ENTRYPOINT ["webhook"] |