provide a way to run app

This commit is contained in:
2024-08-10 14:14:38 +03:00
parent ba6ac26bac
commit 0046755c7d
10 changed files with 468 additions and 168 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM golang:1.22-alpine as golang
WORKDIR /app
COPY . .
RUN go mod download && go mod verify && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o /server .
FROM gcr.io/distroless/static-debian12@sha256:ce46866b3a5170db3b49364900fb3168dc0833dfb46c26da5c77f22abb01d8c3
WORKDIR /app
COPY --from=golang /server .
EXPOSE 9123
ENV DEVSIM_HTTP_ADDR=":9123"
CMD ["/server"]