Download Dockerfile from dracoox/tails: direct link, hf CLI and curl.
- Browser
- Download file 2.73 kB
-
https://huggingface.co/spaces/dracoox/tails/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/dracoox/tails/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/dracoox/tails/resolve/main/Dockerfile
2.73 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| ENV TERM=xterm-256color | |
| ENV NPM_CONFIG_PREFIX=/home/Draco/.npm-global | |
| ENV PATH=$PATH:/home/Draco/.npm-global/bin | |
| # Create sudoers.d directory, user Draco with passwordless sudo and npm global folder | |
| RUN mkdir -p /etc/sudoers.d && \ | |
| useradd -m -u 1000 -s /bin/bash Draco && \ | |
| echo "Draco ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/draco && \ | |
| chmod 440 /etc/sudoers.d/draco && \ | |
| mkdir -p /home/Draco/.npm-global && \ | |
| chown -R Draco:Draco /home/Draco/.npm-global | |
| # Install curl, gnupg, and add NodeSource Node.js 20 repo | |
| RUN apt-get update && \ | |
| apt-get install -y curl gnupg && \ | |
| apt-get clean | |
| RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - | |
| # Install Node.js 20, ffmpeg, and required packages | |
| RUN apt-get install -y --no-install-recommends \ | |
| nodejs \ | |
| ffmpeg \ | |
| python3 python3-pip python3-venv \ | |
| build-essential \ | |
| tmate \ | |
| openssh-client \ | |
| neofetch \ | |
| git \ | |
| wget \ | |
| vim \ | |
| nano \ | |
| unzip \ | |
| zip \ | |
| htop \ | |
| net-tools \ | |
| iputils-ping \ | |
| dnsutils \ | |
| tmux \ | |
| screen \ | |
| jq \ | |
| ca-certificates \ | |
| software-properties-common \ | |
| sqlite3 \ | |
| libsqlite3-dev \ | |
| libssl-dev \ | |
| libffi-dev \ | |
| libxml2-dev \ | |
| libxslt1-dev \ | |
| libjpeg-dev \ | |
| zlib1g-dev \ | |
| libpng-dev \ | |
| libwebp-dev \ | |
| pkg-config \ | |
| rsync \ | |
| lsof \ | |
| sudo \ | |
| gnupg \ | |
| openssl \ | |
| tree \ | |
| mc \ | |
| python3-dev \ | |
| python3-distutils \ | |
| python3-setuptools \ | |
| cron \ | |
| aria2 \ | |
| telnet \ | |
| expect && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Install Python packages globally | |
| RUN pip3 install --no-cache-dir \ | |
| pytelegrambotapi \ | |
| requests \ | |
| beautifulsoup4 \ | |
| lxml \ | |
| flask \ | |
| httpx \ | |
| aiohttp \ | |
| schedule | |
| # Generate SSH keys for tmate (root) | |
| RUN mkdir -p /root/.ssh && \ | |
| ssh-keygen -t rsa -f /root/.ssh/id_rsa -N '' && \ | |
| chmod 700 /root/.ssh && \ | |
| chmod 600 /root/.ssh/id_rsa | |
| # Create /dev/ptmx if missing to avoid crashes (permission 666) | |
| RUN if [ ! -c /dev/ptmx ]; then \ | |
| mknod /dev/ptmx c 5 2 && chmod 666 /dev/ptmx ; \ | |
| fi | |
| # Create /dev/pts directory (empty, since mounting devpts is not possible here) | |
| RUN mkdir -p /dev/pts | |
| # Prepare /app directory owned by Draco | |
| RUN mkdir -p /app && \ | |
| echo "Tmate Session Running..." > /app/index.html && \ | |
| chown -R Draco:Draco /app | |
| WORKDIR /app | |
| # Switch to Draco user | |
| USER Draco | |
| # Verify important versions (optional) | |
| RUN node -v && npm -v && python3 --version && ffmpeg -version | |
| # Use tmate -F foreground, no background, ignore terminal errors to avoid crash | |
| CMD python3 -m http.server 7860 & tmate -F || echo "tmate exited or failed" |