Added Dockerfile

This commit is contained in:
Robin Dittmar
2026-07-03 10:30:33 +02:00
parent 4afb76cea0
commit d98e8e9244
3 changed files with 24 additions and 16 deletions
+20
View File
@@ -0,0 +1,20 @@
FROM golang:1.26 AS build
WORKDIR /app
#COPY go.mod go.sum ./
COPY go.mod ./
RUN go mod download
COPY . .
RUN go build -o ./server github.com/robindittmar/dttmr-api/cmd/api-server
FROM debian:latest
WORKDIR /app
COPY --from=build /app/server /app/server
EXPOSE 8080
CMD ["/app/server"]