Spaces:
Paused

Ice-server / Dockerfile
juanpi18's picture
Create Dockerfile
ad2da66 verified
Raw History Blame Contribute Delete
913 Bytes
FROM ubuntu:22.04
# Evitar bloqueos por ser usuario root
ENV UDOCKER_ALLOW_ROOT=1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y curl python3 python3-pip && rm -rf /var/lib/apt/lists/*
# Instalar udocker y el servidor de Minecraft LCE
RUN pip3 install udocker && udocker install
RUN udocker pull ghcr.io/smartcmd/minecraft-lce-dedicated-server:nightly
RUN udocker create --name=lce_server ghcr.io/smartcmd/minecraft-lce-dedicated-server:nightly
# Instalar Playit para que tus amigos puedan entrar
RUN curl -Lo /usr/local/bin/playit https://github.com/playit-cloud/playit-agent/releases/latest/download/playit-linux-amd64 && \
chmod +x /usr/local/bin/playit
# Script para arrancar el servidor y el túnel al mismo tiempo
RUN echo '#!/bin/bash\nudocker run -p 19132:19132/udp lce_server &\nsleep 10\nplayit' > /start.sh && chmod +x /start.sh
EXPOSE 19132/udp
CMD ["/start.sh"]