feat: add dockerfile

This commit is contained in:
Bastien Riviere 2023-09-01 19:29:27 +02:00
parent b7c3e22875
commit 4ed2de61b5
Signed by: babariviere
GPG key ID: 4E5F0839249F162E
2 changed files with 26 additions and 0 deletions

View file

@ -35,6 +35,13 @@ changelog:
- '^docs:' - '^docs:'
- '^test:' - '^test:'
dockers:
- image_templates:
- "forge.babariviere.com/babariviere/ntfy-bridge:{{ .Tag }}"
- "forge.babariviere.com/babariviere/ntfy-bridge:v{{ .Major }}"
- "forge.babariviere.com/babariviere/ntfy-bridge:v{{ .Major }}.{{ .Minor }}"
- "forge.babariviere.com/babariviere/ntfy-bridge:latest"
gitea_urls: gitea_urls:
api: https://forge.babariviere.com/api/v1 api: https://forge.babariviere.com/api/v1
download: https://forge.babariviere.com download: https://forge.babariviere.com

19
Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM golang:1.21-buster as builder
WORKDIR /app
COPY go.* ./
RUN go mod download
COPY . ./
RUN go build -v -o ntfy-bridge
FROM debian:buster-slim
RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/ntfy-bridge /app/ntfy-bridge
CMD ["/app/ntfy-bridge"]