Download Dockerfile from arnob69/vps: direct link, hf CLI and curl.
- Browser
- Download file 1.85 kB
-
https://huggingface.co/spaces/arnob69/vps/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/arnob69/vps/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/arnob69/vps/resolve/main/Dockerfile
1.85 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| git \ | |
| sudo \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install OpenVSCode Server | |
| RUN curl -fsSL "https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.85.1/openvscode-server-v1.85.1-linux-x64.tar.gz" | tar -xz -C /opt | |
| # Install Node.js & Freebuff globally | |
| RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \ | |
| && apt-get install -y nodejs \ | |
| && npm install -g freebuff | |
| RUN useradd -m -u 1000 user && \ | |
| echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
| # CRITICAL PERMISSIONS FIX: Pre-create /data tracks as root and give user 1000 full access | |
| RUN mkdir -p /data /data/.vscode-user /data/.vscode-extensions && \ | |
| chown -R user:user /data && \ | |
| chmod -R 777 /data | |
| RUN mkdir -p /home/user/workspace && \ | |
| chown -R user:user /home/user && \ | |
| chmod -R 777 /home/user | |
| # Setup Windows terminal aliases | |
| RUN echo 'alias dir="ls -la"' >> /home/user/.bashrc && \ | |
| echo 'alias cls="clear"' >> /home/user/.bashrc && \ | |
| echo 'alias copy="cp"' >> /home/user/.bashrc && \ | |
| echo 'alias move="mv"' >> /home/user/.bashrc && \ | |
| echo 'alias del="rm"' >> /home/user/.bashrc && \ | |
| echo 'alias md="mkdir"' >> /home/user/.bashrc && \ | |
| echo 'alias rd="rmdir"' >> /home/user/.bashrc && \ | |
| echo 'alias ipconfig="ifconfig || ip a"' >> /home/user/.bashrc | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR /data | |
| EXPOSE 7860 | |
| # Launch VS Code pointing directly to our unlocked persistent partition | |
| CMD ["/opt/openvscode-server-v1.85.1-linux-x64/bin/openvscode-server", "--host", "0.0.0.0", "--port", "7860", "--without-connection-token", "--workspace", "/data", "--user-data-dir", "/data/.vscode-user", "--extensions-dir", "/data/.vscode-extensions"] |