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 ENV DOCKER true EXPOSE 3000 CMD ["/app/gothub", "serve"]