Download Dockerfile from ltxlong/webssh: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/ltxlong/webssh/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/ltxlong/webssh/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/ltxlong/webssh/resolve/main/Dockerfile
1.05 kB
| FROM python:3-alpine | |
| LABEL maintainer='<author>' | |
| LABEL version='0.0.0-dev.0-build.0' | |
| # Install necessary packages | |
| RUN apk add --no-cache \ | |
| libc-dev \ | |
| libffi-dev \ | |
| gcc \ | |
| wget \ | |
| unzip | |
| # Download and unzip the GitHub repository | |
| RUN set -e; \ | |
| DOWNLOAD_URL="https://github.com/crazypeace/huashengdun-webssh/archive/refs/heads/master.zip"; \ | |
| echo "Downloading from: $DOWNLOAD_URL"; \ | |
| wget "$DOWNLOAD_URL" -O /tmp/webssh.zip || (echo "Download failed. URL may be incorrect." && exit 1); \ | |
| unzip /tmp/webssh.zip -d /tmp && \ | |
| mv /tmp/huashengdun-webssh-master /code && \ | |
| rm /tmp/webssh.zip | |
| WORKDIR /code | |
| # Install Python dependencies | |
| RUN pip install -r requirements.txt --no-cache-dir | |
| # Remove unnecessary packages | |
| RUN apk del gcc libc-dev libffi-dev wget unzip | |
| # Set up user and permissions | |
| RUN addgroup webssh && \ | |
| adduser -Ss /bin/false -g webssh webssh && \ | |
| chown -R webssh:webssh /code | |
| EXPOSE 8888/tcp | |
| USER webssh | |
| # Modify the CMD instruction to use an array format | |
| CMD ["python", "run.py"] |