-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
71 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,89 @@ | ||
# minecraft-docker | ||
minecraft dockerfiles for easy server | ||
# simple-minecraft-docker | ||
Minecraft dockerfile for a simple easy server | ||
|
||
## simple setup | ||
for a simple setup, you can execute the autodeploy.sh file after configuring both the minecraft-server and waterfall. | ||
# :exclamation: Be informed | ||
All the requirements have default values if you use the docker-compose.yml | ||
If you are not using the docker-compose.yml, the container may behave unexpectedly. | ||
|
||
## setup | ||
### creating public network (optinal) | ||
a public network is required to connect servers outside the stack. the default network name is called mc-global | ||
# Run commands inside the container. | ||
The container contains a node.js script to execute commands via RCON. | ||
Commands can be isseud with the folowing command: | ||
``` | ||
docker exec minecraft-docker rcon (command here) | ||
``` | ||
|
||
# setup | ||
### Creating public network (optinal) | ||
A public network is required to connect servers outside the container/stack. the default network name is called mc-global. | ||
This is only required for when you are planning it to use the server for bungeecord. | ||
``` | ||
docker network create -d overlay --attachable public | ||
``` | ||
|
||
### configuring the containers. | ||
The container can partialy be configured in the docker | ||
both containers need to beconfigured before they should be build. | ||
the configuration file of both containers are located in their respective directories. | ||
### Configuring the containers. | ||
The container can partialy be configured with environment variables. | ||
The container needs to beconfigured before they should be build. | ||
The environment variables can be configured in the Dockerfiles and/or in the docker-compose file. | ||
#### Required environment variables: | ||
``` | ||
OPTION="1" | ||
UTL="https://serverjars.com/api/fetchJar/paper/1.18.2" | ||
JAR_NAME"server.jar" | ||
XMX="2G" | ||
XMS="512M" | ||
``` | ||
#### Optional environmetn variables: | ||
``` | ||
RCON_PORT="25575" | ||
ENABLE_COMMAND_BLOCK="false" | ||
GAMEMODE="survival" | ||
MOTD="A Minecraft server in Docker" | ||
QUERY_PORT="25565" | ||
PVP="true" | ||
DIFFICULTY="easy" | ||
MAX_PLAYERS="20" | ||
ONLINE_MODE="true" | ||
VIEW_DISTANCE="10" | ||
SERVER_IP="" | ||
SERVER_PORT="25565" | ||
ENABLE_RCON="true" | ||
RESOURCE_PACK="" | ||
RCON_PASSWORD="Ch@ng3m3" | ||
FORCE_GAMEMODE="false" | ||
WHITE_LIST="false" | ||
SPAWN_PROTECTION="16" | ||
``` | ||
The required environment file of the container can also be configured via the files located in the respective directory: | ||
``` | ||
./minecraft-docker/data/config | ||
``` | ||
|
||
### Volumes | ||
The container filesystem can be safely mounted at: | ||
#### Required mountpoints | ||
``` | ||
/app/container | ||
``` | ||
#### Optional mount points: | ||
``` | ||
./minecraft-server/data/config | ||
./waterfall/data/config | ||
/app/container/plugins | ||
/app/container/logs | ||
``` | ||
|
||
### building the containers. | ||
both containers can be build by running the following commands: | ||
### Building the containers. | ||
The container can be build by running the following command: | ||
#### Ubuntu container: | ||
``` | ||
docker build -t minecraft-docker -f Dockerfile ./minecraft-server/ | ||
docker build -t waterfall-docker ./waterfall/ | ||
docker build -t minecraft-docker -f Dockerfile ./minecraft-docker/ | ||
``` | ||
#### Alpine container: | ||
``` | ||
docker build -t minecraft-docker -f DockerfileAlpine ./minecraft-server/ | ||
docker build -t minecraft-docker -f DockerfileAlpine ./minecraft-docker/ | ||
``` | ||
|
||
### running the containers | ||
the containers can be run with the docker-compose.yml file | ||
configuring the docker-compose.yml file is recomended. | ||
### Running the container | ||
The container can be run with the docker-compose.yml file and the following command: | ||
``` | ||
docker-compose up | ||
docker-compose up -d | ||
``` |