Building and running the EmpireCraft Minecraft Server
docker compose build
or
docker build \
--build-context source=https://github.com/starlis/empirecraft.git \
--label com.docker.compose.project=empirecraft \
--label com.docker.compose.service=empirecraft \
--label com.docker.compose.version="$(docker compose version --short | sed 's/-.*//')" \
-
< Dockerfile
docker compose up --detach
will build (if needed) and start the server on 0.0.0.0:25565docker container attach empirecraft-empirecraft-1
will attach to the console of the serverCTRL-c
orstop
will stop the server- Use
CTRL-p CTRL-q
to detach from the console and leave the server running
To launch the server, with the Compose volume, and attached to console:
docker run -it -v empirecraft_world:/world -p 25565:25565 empirecraft
By default, the compose file will pull a context from Starlis' EmpireCraft GitHub repository.
If you add Dockerfile
and compose.yaml
to the EmpireCraft repository, you
should remove the --from=source
from the Dockerfile, and remove the
additional_contexts
from compose.yaml