Potato-Code-Fan-Club commited on
Commit
7106950
·
verified ·
1 Parent(s): d00da17

Create Dockerfile

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