add docker stuff

This commit is contained in:
hexlocation 2025-06-14 16:07:40 +02:00
parent c844ab063b
commit 8c7b09b8d8
2 changed files with 29 additions and 0 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM docker.io/golang:1.24.4-alpine3.22 as compiled
WORKDIR /tmp/src
# Copy the source code into the temp folder.
COPY . /tmp/src
RUN go build -v -o /tmp/src/backend
FROM alpine:latest AS run
COPY --from=compiled /tmp/src/backend /usr/bin/backend
WORKDIR /app
ENV GIN_MODE=release
CMD ["/usr/bin/backend"]