40dcdcf68c
Signed-off-by: Odyssey <odyssey346@disroot.org>
21 行
430 B
Docker
21 行
430 B
Docker
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
|
|
|
ARG TARGETARCH
|
|
|
|
WORKDIR /src
|
|
RUN apk --no-cache add git
|
|
RUN git clone https://codeberg.org/gothub/gothub .
|
|
|
|
RUN go mod download
|
|
RUN GOOS=linux GOARCH=$TARGETARCH go build -o /src/gothub
|
|
|
|
FROM alpine:3.16 as bin
|
|
|
|
WORKDIR /app
|
|
COPY --from=build /src/gothub .
|
|
COPY --from=build /src/views ./views
|
|
COPY --from=build /src/public ./public
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/app/gothub", "serve"] |