Initial commit

This commit is contained in:
2023-07-22 06:32:44 +00:00
commit 9bb2865a65
15 changed files with 964 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:1.20-alpine as build-stage
RUN apk --no-cache add \
g++ \
git \
make \
bash
ARG VERSION
ENV VERSION=${VERSION}
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 go build -o /hook --ldflags "-w -extldflags '-static' -X cmd.Version=${VERSION:-dev}" .
# Final image.
FROM alpine:latest
RUN apk --no-cache add \
ca-certificates
COPY --from=build-stage /hook /usr/local/bin/hook
ENTRYPOINT ["/usr/local/bin/hook"]