nixshare/Dockerfile

21 lines
319 B
Docker
Raw Normal View History

2024-08-28 13:47:44 +03:00
# syntax=docker/dockerfile:1
FROM gitrepo.ru/base/go:latest AS go
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go generate && CGO_ENABLED=0 GOOS=linux go build -o nixshare
FROM scratch
WORKDIR /app
COPY --from=go /app/nixshare ./nixshare
2024-08-28 15:22:01 +03:00
COPY --from=go /app/html ./html
2024-08-28 13:47:44 +03:00
EXPOSE 8000
CMD ["./nixshare"]