Download Dockerfile from pabla1322/server: direct link, hf CLI and curl.
- Browser
- Download file 3.6 kB
-
https://huggingface.co/spaces/pabla1322/server/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/pabla1322/server/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/pabla1322/server/resolve/main/Dockerfile
3.6 kB
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PLAYIT_HOME=/data/playit_gg \ | |
| SECRET_KEY="" \ | |
| MC_DIR=/data/bedrock-server \ | |
| SCRIPTS_DIR=/data/scripts \ | |
| LOG_DIR=/data/logs | |
| # ── System packages ─────────────────────────────────────────────────── | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| curl wget unzip \ | |
| libcurl4 libssl3 ca-certificates \ | |
| uuid-runtime nano tar gzip \ | |
| python3 python3-pip \ | |
| cron git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # ── Python dependencies ─────────────────────────────────────────────── | |
| RUN pip install --no-cache-dir \ | |
| google-api-python-client \ | |
| google-auth-httplib2 \ | |
| google-auth-oauthlib | |
| # ── Directory structure ─────────────────────────────────────────────── | |
| RUN mkdir -p \ | |
| /data/bedrock-server/worlds \ | |
| /data/bedrock-server/backups \ | |
| /data/playit_gg \ | |
| /data/scripts \ | |
| /data/logs | |
| WORKDIR /data/bedrock-server | |
| # ── Download Minecraft Bedrock server directly (no scraping) ───────── | |
| RUN curl -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64)" \ | |
| -o /tmp/bedrock-server.zip \ | |
| "https://www.minecraft.net/bedrockdedicatedserver/bin-linux-preview/bedrock-server-1.26.20.28.zip" && \ | |
| unzip /tmp/bedrock-server.zip -d /data/bedrock-server && \ | |
| rm /tmp/bedrock-server.zip && \ | |
| chmod +x /data/bedrock-server/bedrock_server | |
| # ── Install playit agent ────────────────────────────────────────────── | |
| RUN curl -L \ | |
| -o /usr/local/bin/playit \ | |
| "https://github.com/playit-cloud/playit-agent/releases/latest/download/playit-linux-amd64" && \ | |
| chmod +x /usr/local/bin/playit | |
| # ── Server config files ─────────────────────────────────────────────── | |
| COPY server.properties allowlist.json permissions.json ./ | |
| # ── Main startup scripts ────────────────────────────────────────────── | |
| COPY start.sh run.sh status_server.py ./ | |
| # ── Utility / maintenance scripts ──────────────────────────────────── | |
| COPY backup.sh /data/scripts/backup.sh | |
| COPY auto_restart.sh /data/scripts/auto_restart.sh | |
| COPY health_check.sh /data/scripts/health_check.sh | |
| COPY monitor.sh /data/scripts/monitor.sh | |
| COPY google_drive_backup.py /data/scripts/google_drive_backup.py | |
| # ── Cron schedule ───────────────────────────────────────────────────── | |
| COPY crontab.txt /data/crontab.txt | |
| # ── Permissions ─────────────────────────────────────────────────────── | |
| RUN chmod +x \ | |
| /data/bedrock-server/start.sh \ | |
| /data/bedrock-server/run.sh \ | |
| /data/scripts/*.sh | |
| # 7860 = HuggingFace keepalive + status dashboard | |
| # 19132/19133 = Minecraft Bedrock UDP (tunneled via playit.gg) | |
| EXPOSE 7860 19132/udp 19133/udp | |
| USER root | |
| CMD ["bash", "/data/bedrock-server/start.sh"] | |