Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +28 -45
Dockerfile
CHANGED
|
@@ -1,45 +1,28 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 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"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|