Potato-Code-Fan-Club commited on
Commit
55804b7
·
verified ·
1 Parent(s): 69af7dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -19
Dockerfile CHANGED
@@ -3,24 +3,9 @@ FROM ubuntu:22.04
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  USER root
 
6
 
7
- RUN apt-get update && apt-get install -y \
8
- openssh-server curl wget sudo git \
9
- && rm -rf /var/lib/apt/lists/*
10
 
11
- RUN mkdir /var/run/sshd
12
- RUN echo 'root:TudouBiancheng-Fan-Club' | chpasswd
13
- RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
14
-
15
- RUN curl -L --output cloudflared.deb https://github.com \
16
- && dpkg -i cloudflared.deb \
17
- && rm cloudflared.deb
18
-
19
- RUN echo '#!/bin/bash\n\
20
- /usr/sbin/sshd\n\
21
- cloudflared tunnel --no-autoupdate run --token "$TUNNEL_TOKEN"\n\
22
- ' > /start.sh && chmod +x /start.sh
23
-
24
- EXPOSE 7860
25
-
26
- CMD ["/start.sh"]
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
 
5
  USER root
6
+ RUN apt-get install openssh-server openssh-client openssh
7
 
8
+ RUN chkconfig sshd on
9
+ RUN service sshd start
 
10
 
11
+ EXPOSE 7860