Spaces:
Sleeping
Sleeping
Download Dockerfile from clone3/GameServerZ: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/clone3/GameServerZ/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/clone3/GameServerZ/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/clone3/GameServerZ/resolve/main/Dockerfile
1.01 kB
| FROM nikolaik/python-nodejs:python3.9-nodejs18 | |
| USER root | |
| RUN apt-get -y update && apt-get -y install nginx xvfb openssh-server | |
| RUN mkdir -p /var/cache/nginx \ | |
| /var/log/nginx \ | |
| /var/lib/nginx | |
| RUN touch /var/run/nginx.pid | |
| RUN chown -R pn:pn /var/cache/nginx \ | |
| /var/log/nginx \ | |
| /var/lib/nginx \ | |
| /var/run/nginx.pid | |
| USER pn | |
| ENV HOME=/home/pn \ | |
| PATH=/home/pn/.local/bin:$PATH | |
| RUN mkdir $HOME/app | |
| WORKDIR $HOME/app | |
| RUN npm install --save express ws | |
| COPY --chown=pn nginx.conf /etc/nginx/sites-available/default | |
| # Create the .ssh directory if it does not exist | |
| RUN mkdir -p /home/pn/.ssh | |
| # Generate SSH key pair non-interactively | |
| RUN ssh-keygen -t rsa -b 4096 -f /home/pn/.ssh/id_rsa -N "" | |
| # Optionally, set permissions for the .ssh directory and keys | |
| RUN chmod 700 /home/pn/.ssh && \ | |
| chmod 600 /home/pn/.ssh/id_rsa && \ | |
| chmod 644 /home/pn/.ssh/id_rsa.pub | |
| COPY --chown=pn . . | |
| CMD ["bash", "run.sh"] |