mirror of
https://codeberg.org/aryak/mozhi
synced 2024-12-22 10:59:45 +05:30
21 lines
383 B
Docker
21 lines
383 B
Docker
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
|
|
|
ARG TARGETARCH
|
|
|
|
WORKDIR /src
|
|
RUN apk --no-cache add git
|
|
COPY . .
|
|
|
|
RUN go mod download
|
|
RUN go run github.com/swaggo/swag/cmd/swag@latest init --parseDependency
|
|
RUN GOOS=linux GOARCH=$TARGETARCH go build -o /src/mozhi
|
|
|
|
FROM alpine:3.16 as bin
|
|
|
|
WORKDIR /app
|
|
COPY --from=build /src/mozhi .
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/app/mozhi", "serve"]
|