driver / Dockerfile
HongShi418's picture
Update Dockerfile
c848830 verified
raw
history blame
668 Bytes
FROM ubuntu:22.04
# 安装依赖
RUN apt-get update && apt-get install -y \
curl tar gzip jq aria2 \
&& rm -rf /var/lib/apt/lists/*
# 创建用户
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
WORKDIR $HOME/openlist
# 下载 OpenList 最新版本
RUN curl -sL https://api.github.com/repos/openlistteam/openlist/releases/latest | \
jq -r '.assets[] | select(.name | test("linux-amd64.tar.gz$")) | .browser_download_url' | \
xargs curl -L | tar -zxvf - -C .
# 设置权限
RUN chmod +x openlist
# 复制配置文件
COPY --chown=user:user data/config.json data/config.json
# 启动命令
CMD ["./openlist", "server", "--data", "./data"]