proxy / Dockerfile
pcdn's picture
Upload 5 files
d85521f verified
raw
history blame
No virus
1.3 kB
# 使用最新的 Ubuntu 作为基础镜像
FROM ubuntu:latest
# 必要软件及依赖
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y git curl wget tzdata \
&& apt-get install sudo -y \
&& sudo apt-get install aria2 -y
# 设置环境变量 TZ
ENV TZ=Asia/Shanghai
# 更新系统时间(可选)
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 设置工作目录
WORKDIR /ghostfile
# 将当前目录中的所有文件复制到工作目录
COPY . .
# 下载 alist 文件并检查是否下载成功
RUN wget https://github.com/alist-org/alist-proxy/releases/download/v0.0.6/alist-proxy_0.0.6_linux_amd64.tar.gz \
&& tar -zxvf alist-proxy_0.0.6_linux_amd64.tar.gz \
&& rm alist-proxy_0.0.6_linux_amd64.tar.gz \
&& wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
# 使用 chmod 给 /zmal 文件夹内的所有文件赋予权限
RUN chmod -R 777 /ghostfile
# 授予程序执行权限
RUN chmod +x alist-proxy
RUN chmod +x cloudflared-linux-amd64
# 复制 entrypoint 脚本
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# 暴露容器的端口
EXPOSE 5243
EXPOSE 6800
EXPOSE 8080
# 定义容器启动时执行的命令
ENTRYPOINT ["/entrypoint.sh"]