FROM ubuntu:22.04 | |
# Set up a new user named "user" with user ID 1000 | |
RUN useradd -m -u 1000 user | |
# Switch to the "user" user | |
USER user | |
# Set home to the user's home directory | |
ENV HOME=/home/user \ | |
FILE_SYNC=$FILE_SYNC\ | |
PATH=/home/user/.local/bin:$PATH | |
# Set the working directory to the user's home directory | |
WORKDIR $HOME/alist | |
COPY --chown=user . $HOME/alist | |
RUN chmod +x $HOME/alist/alist | |
# CMD ["bash", "alist", "server"] | |
CMD cd $HOME/alist && ./alist server | |
EXPOSE 5244 | |
#FROM alpine:edge | |
#WORKDIR /opt/alist/ | |
#COPY alist ./alist | |
#COPY entrypoint.sh /entrypoint.sh | |
#RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories | |
#RUN apk add --no-cache bash ca-certificates su-exec tzdata; \ | |
# chmod +x /entrypoint.sh | |
#ENV PUID=0 PGID=0 UMASK=022 TZ=Asia/Shanghai | |
#EXPOSE 5244 | |
#CMD [ "/entrypoint.sh" ] |