Initial public release of birdwatch-relay
This commit is contained in:
commit
c176f2ad24
17 changed files with 2025 additions and 0 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
FROM golang:1.22-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
# go mod tidy resolves dependencies from source imports — no go.sum needed at
|
||||
# repo root for first-time users running `docker compose build`.
|
||||
RUN go mod tidy && \
|
||||
CGO_ENABLED=0 GOOS=linux go build \
|
||||
-ldflags="-s -w" \
|
||||
-o /out/birdwatch-relay \
|
||||
.
|
||||
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=build /out/birdwatch-relay /birdwatch-relay
|
||||
USER nonroot:nonroot
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/birdwatch-relay"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue