mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
a5bb816b10
Signed-off-by: Odyssey <odyssey346@disroot.org>
14 lines
406 B
Docker
14 lines
406 B
Docker
FROM golang:alpine AS build
|
|
WORKDIR /app
|
|
RUN apk add --no-cache git
|
|
RUN git clone https://codeberg.org/gothub/gothub .
|
|
RUN go mod download
|
|
RUN go build -ldflags "-X codeberg.org/gothub/gothub/pages.Version=$(git rev-parse --short HEAD)"
|
|
|
|
FROM alpine:latest AS bin
|
|
WORKDIR /app
|
|
COPY --from=build /app/gothub .
|
|
COPY --from=build /app/public .
|
|
COPY --from=build /app/views .
|
|
CMD ["./gothub serve"]
|
|
EXPOSE 3000 |