mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 04:06:18 +08:00

* fix(docker): reduce image size * refactor(docker): update user and group creation * Update Dockerfile Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: MadDogOwner <xiaoran@xrgzs.top> --------- Signed-off-by: MadDogOwner <xiaoran@xrgzs.top> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
26 lines
666 B
Docker
26 lines
666 B
Docker
ARG BASE_IMAGE_TAG=base
|
|
FROM ghcr.io/openlistteam/openlist-base-image:${BASE_IMAGE_TAG}
|
|
LABEL MAINTAINER="OpenList"
|
|
ARG TARGETPLATFORM
|
|
ARG INSTALL_FFMPEG=false
|
|
ARG INSTALL_ARIA2=false
|
|
ARG USER=openlist
|
|
ARG UID=1001
|
|
ARG GID=1001
|
|
|
|
WORKDIR /opt/openlist/
|
|
|
|
RUN addgroup -g ${GID} ${USER} && \
|
|
adduser -D -u ${UID} -G ${USER} ${USER} && \
|
|
mkdir -p /opt/openlist/data
|
|
|
|
COPY --chmod=755 --chown=${UID}:${GID} /build/${TARGETPLATFORM}/openlist ./
|
|
COPY --chmod=755 --chown=${UID}:${GID} entrypoint.sh /entrypoint.sh
|
|
|
|
USER ${USER}
|
|
RUN /entrypoint.sh version
|
|
|
|
ENV UMASK=022 RUN_ARIA2=${INSTALL_ARIA2}
|
|
VOLUME /opt/openlist/data/
|
|
EXPOSE 5244 5245
|
|
CMD [ "/entrypoint.sh" ] |