🐳 Add Dockerfile
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM golang:1.15 AS builder
|
||||
|
||||
RUN mkdir /data && mkdir /data/shares
|
||||
|
||||
ADD . /src
|
||||
WORKDIR /src
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN go build .
|
||||
|
||||
# Actual image
|
||||
FROM scratch
|
||||
|
||||
ENV DATA_DIR=/data/shares
|
||||
ENV DATABASE=/data/ShareDAV.db
|
||||
|
||||
COPY --from=builder /src/ShareDAV /app/ShareDAV
|
||||
COPY --from=builder /data /data
|
||||
|
||||
ENTRYPOINT ["/app/ShareDAV"]
|
||||
CMD ["serve"]
|
||||
Reference in New Issue
Block a user