Updated with latest and title top level

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2021-11-12 17:39:43 +00:00
parent b55b29e661
commit 7c163203b3
8 changed files with 190 additions and 159 deletions

13
Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM golang:1.16-alpine AS builder
RUN apk update && apk add --no-cache git && apk add -U --no-cache ca-certificates
WORKDIR /app/
ADD go.mod go.sum ./
RUN go mod download
ADD . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o dir2opds main.go
FROM scratch
WORKDIR /app/
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/dir2opds /app/dir2opds
ENTRYPOINT ["/app/dir2opds"]