alist/Dockerfile

23 lines
609 B
Docker
Raw Normal View History

2023-11-25 06:22:13 +00:00
FROM alpine:edge as builder
2022-09-08 12:18:45 +00:00
LABEL stage=go-builder
WORKDIR /app/
RUN apk add --no-cache bash curl gcc git go musl-dev
COPY go.mod go.sum ./
RUN go mod download
2022-09-08 12:18:45 +00:00
COPY ./ ./
RUN bash build.sh release docker
2022-09-08 12:18:45 +00:00
2023-11-25 06:22:13 +00:00
FROM alpine:edge
2022-09-08 12:18:45 +00:00
LABEL MAINTAINER="i@nn.ci"
VOLUME /opt/alist/data/
WORKDIR /opt/alist/
COPY --from=builder /app/bin/alist ./
COPY entrypoint.sh /entrypoint.sh
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache bash ca-certificates su-exec tzdata; \
chmod +x /entrypoint.sh && \
rm -rf /var/cache/apk/*
2022-12-30 06:21:39 +00:00
ENV PUID=0 PGID=0 UMASK=022
EXPOSE 5244 5245
CMD [ "/entrypoint.sh" ]