igor04091968 commited on
Commit
0111e13
·
verified ·
1 Parent(s): 9a06880

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -45
Dockerfile CHANGED
@@ -1,45 +1,28 @@
1
- FROM debian:bullseye-slim
2
- # Install necessary packages and clean up
3
- RUN apt-get update && apt-get install -y \
4
- dos2unix \
5
- wget \
6
- curl \
7
- tar \
8
- bash \
9
- ca-certificates \
10
- --no-install-recommends && \
11
- rm -rf /var/lib/apt/lists/*
12
-
13
- SHELL ["/bin/bash", "-c"]
14
-
15
- # Install chisel
16
- ARG CHISEL_VERSION=1.10.1
17
- RUN wget https://github.com/jpillora/chisel/releases/download/v${CHISEL_VERSION}/chisel_${CHISEL_VERSION}_linux_amd64.gz -O /tmp/chisel.gz && \
18
- gunzip /tmp/chisel.gz && \
19
- mv /tmp/chisel /usr/local/bin/chisel && \
20
- chmod +x /usr/local/bin/chisel
21
-
22
- # Download and extract 3x-ui
23
- #RUN ARCH=$(uname -m) && \
24
- # if [ "$ARCH" = "x86_64" ]; then ARCH="amd64"; fi && \
25
- # if [ "$ARCH" = "aarch64" ]; then ARCH="arm64"; fi && \
26
- # wget -O /usr/local/x-ui-linux-${ARCH}.tar.gz \
27
- # "https://github.com/MHSanaei/3x-ui/releases/latest/download/x-ui-linux-${ARCH}.tar.gz" && \
28
- # mkdir -p /usr/local/x-ui/ && \
29
- # tar -zxvf /usr/local/x-ui-linux-*.tar.gz -C /usr/local/x-ui/ --strip-components=1 && \
30
- # rm /usr/local/x-ui-linux-*.tar.gz && \
31
- # chmod +x /usr/local/x-ui/x-ui && \
32
- # cp /usr/local/x-ui/x-ui.sh /usr/bin/x-ui
33
-
34
- ## Copy the startup script
35
- COPY start.sh /usr/local/bin/start.sh
36
-
37
- ## Make the script executable
38
- RUN chmod +x /usr/local/bin/start.sh
39
- ## Expose the port
40
- EXPOSE 993
41
- #
42
- ## Set the entrypoint to our startup script
43
- #RUN chmod -R 777 /usr/local/x-ui/
44
- ENTRYPOINT ["/bin/bash", "-c", "/usr/local/bin/start.sh"]
45
- ## Trivial change to force rebuild
 
1
+ # Base image
2
+ FROM alpine:latest
3
+
4
+ # Install packages
5
+ RUN apk add --no-cache stunnel openssh iperf3
6
+
7
+ # Create SSH directories and generate host keys for the container's sshd
8
+ RUN mkdir -p /root/.ssh && chmod 700 /root/.ssh && ssh-keygen -A
9
+
10
+ # Copy configs
11
+ COPY stunnel.conf /etc/stunnel/stunnel.conf
12
+ COPY sshd_config /etc/ssh/sshd_config
13
+
14
+ # Copy entrypoint and make it executable
15
+ COPY entrypoint.sh /entrypoint.sh
16
+ RUN chmod +x /entrypoint.sh
17
+
18
+ # Add public keys to authorized_keys
19
+ # Note: For a real Hugging Face Space, it's better to manage keys via Space Secrets.
20
+ # This is included for reproducibility of the original environment.
21
+ RUN echo 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDIG17gM3oWQd0bw2L+DG0UZZEvAh/gOa2PsqwKRWLptikxruaNBezdE1aaGkU2gqTqCoUERXeUAU7ICjyWC6t88vsNNYlCYhIqUDiEhIrwoCNFLXcT0Nb0I0V3JNHmLo0328E/h22nOYdkrA/n87ngYmhAyhVzm4CBls2LDQjo2v1i8/99cb+B84IpL7a8RspeqFC7Al4UpYAB1Rw7vVfW84wLOb/ZUoDMDmqW1L0jDeSRee6Lz4u4PRmyh/0MCEnj9lD8TCa0JH/xEKLxHA7LflQEMCpnp/pE2yi8qXXJkvV3EAAKd7fVMxWIGI98Qd6OwBTb3e45tHLnooCM1bHIjeuo5mAss7gPRqE8++lOhFsOTG+6VYuJFSWAanB0HPoRCT9BBOqbdUi3rVrVrARmf7KDMkAk0V9oHox9CQMasZDHnq1PhcYFczoImDOgodzYS64llPLo3nqtrjdn7jycWLNdJHIY6qKif+Xgj6fzIEfErBTvJiwK0vFjcS2R8+ptC6Sf2YvxSB+S6R2Lqm9zrYFeM52cvDBGZJFpN6EZw9T5K95GyovCgFgCYWWOpWsxiJVruDcBGHbEJjUxWGRanRFUtq6WOcJ2YIn0+K5l/lMjE2f3PDPPw3bSTYrmE3UrUstnCAWi7hL27rKGcTmwBSSnmYJStGWkR099enw== igor04091968@cs-1030016233626-default' >> /root/.ssh/authorized_keys
22
+
23
+ # The private key for vds1 will be mounted or injected as a secret.
24
+
25
+ # Expose the port that will be mapped by Hugging Face
26
+ EXPOSE 2222
27
+
28
+ ENTRYPOINT ["/entrypoint.sh"]