timmy commited on
Commit
1a0f6ab
·
1 Parent(s): 5a53a7c
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,14 +1,16 @@
1
- FROM ubuntu:20.04
2
 
3
- RUN apt-get update && \
4
- DEBIAN_FRONTEND=noninteractive apt-get install -y dante-server iproute2 passwd && \
5
- apt-get clean && rm -rf /var/lib/apt/lists/*
6
 
7
- COPY dante.template.conf /etc/dante.template.conf
8
  COPY entrypoint.sh /entrypoint.sh
9
  RUN chmod +x /entrypoint.sh
10
 
 
11
  EXPOSE 7860
12
 
 
13
  ENTRYPOINT ["/entrypoint.sh"]
14
  CMD []
 
1
+ FROM dperson/dante:latest
2
 
3
+ # 设置环境变量,默认用户名密码,如果容器启动时未传入,可用 entrypoint 脚本生成随机
4
+ ENV USERNAME=""
5
+ ENV PASSWORD=""
6
 
7
+ # 复制 entrypoint 脚本
8
  COPY entrypoint.sh /entrypoint.sh
9
  RUN chmod +x /entrypoint.sh
10
 
11
+ # 暴露 SOCKS5 端口
12
  EXPOSE 7860
13
 
14
+ # 启动容器时执行 entrypoint
15
  ENTRYPOINT ["/entrypoint.sh"]
16
  CMD []