Spaces:
Paused
Paused
Download Dockerfile from EgorQwerty/server: direct link, hf CLI and curl.
- Browser
- Download file 1.22 kB
-
https://huggingface.co/spaces/EgorQwerty/server/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/EgorQwerty/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/EgorQwerty/server/resolve/main/Dockerfile
1.22 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y \ | |
| locales ttyd postgresql-14 mosquitto nginx supervisor \ | |
| sudo curl btop openssh-server ca-certificates iproute2 \ | |
| && locale-gen en_US.UTF-8 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Исправленная установка Chisel | |
| RUN curl https://i.jpillora.com/chisel! | bash && \ | |
| chmod +x /usr/local/bin/chisel | |
| # Настройки SSH | |
| RUN mkdir -p /var/run/sshd && \ | |
| ssh-keygen -A && \ | |
| echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && \ | |
| echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config | |
| # Создание необходимых папок | |
| RUN mkdir -p /var/run/postgresql /var/log/supervisor /var/log/nginx /var/www/html && \ | |
| chown -R postgres:postgres /var/run/postgresql | |
| # Копируем конфиги | |
| COPY nginx.conf /etc/nginx/sites-available/default | |
| COPY supervisord.conf /etc/supervisor/supervisord.conf | |
| COPY mosquitto.conf /etc/mosquitto/mosquitto.conf | |
| COPY entrypoint.sh /entrypoint.sh | |
| RUN chmod +x /entrypoint.sh && \ | |
| echo "<h1>Server is running!</h1>" > /var/www/html/index.html | |
| # HF требует порт 7860 | |
| EXPOSE 7860 | |
| ENTRYPOINT ["/entrypoint.sh"] |