mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-25 06:44:03 +08:00

This is to enable the use case where the stock Docker image is used with different flags. E.g. `docker run xhofe/alist:latest ./alist server --data=mydata` This was the behavior until PR#2818 changed it. This would make the image more usable.
19 lines
481 B
Docker
19 lines
481 B
Docker
FROM alpine:edge as builder
|
|
LABEL stage=go-builder
|
|
WORKDIR /app/
|
|
COPY ./ ./
|
|
RUN apk add --no-cache bash curl gcc git go musl-dev; \
|
|
bash build.sh release docker
|
|
|
|
FROM alpine:edge
|
|
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 add --no-cache bash ca-certificates su-exec tzdata; \
|
|
chmod +x /entrypoint.sh
|
|
ENV PUID=0 PGID=0 UMASK=022
|
|
EXPOSE 5244
|
|
CMD [ "/entrypoint.sh" ]
|