Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

linux install docker

unknown edited this page Nov 23, 2020 · 1 revision

Docker Install

Note: This guide is for advanced users who are experienced with docker.

For a simplified, noob-friendly guide, check out this guide on our forums.

Or, you can use the Auto-Install Script

Before you start

  1. Make sure your user id is 1000 (Due to Docker restrictions, the user id must match). On Debian based distros this can be checked with id -u <username>

  2. Make sure you have Docker installed. See the docs for more information. The above link is only for Debian, but you can find other distros in the menu. Using the version from your distro's repository is not enough! You must add Docker's own repository.

Downloading

  1. Download the official BDS software (WINDOWS VERSION) from here. Extract it wherever you like.

  2. Download and extract the ElementZero-*-win64.tar.zst from releases to the folder that you extracted the BDS software to. You can use tar xvf ElementZero-*-win64.tar.zst -C <bds folder> --strip-components 1 to extract files. If this doesn't work, please download a different format, and use a corresponding program to extract.

Running the software

You have multiple options here. The easiest would be to run it via Docker cli. If you wish, you could also make a custom Dockerfile.

Docker cli

To run the server:

docker run --rm -ti --name elementzero -p 19132:19132/udp -v <bds folder>:/data codehz/wine:bdlauncher-runtime

Remember to replace <bds folder> with the folder containing both BDS, and ElementZero.

If you plan on using the restart command below, instead of retyping the run command, you have to remove the --rm flag from said run command. Also, only use this to restart a stopped server. Do not restart a running server.

Do not use docker stop either, as it won't properly save the world, and may lead to corruption! Whenever you stop the server, it is recommended you attach to the container, then execute the stop command.

To restart a stopped server you can use:

docker restart elementzero

Note: It you wish to run the software in the background you can detach from the container with Ctrl+p followed by Ctrl+q. You can also start the server in this detached mode, by changing -ti to -tid in the the run command.

For Docker compose

Suggested by @IvanTurgenev.

version: "2"
services:
  bedrockmod:
    image: codehz/wine:bdlauncher-runtime
    container_name: bedrockmod
    volumes:
      - <bds folder>:/data
    network_mode: host
    restart: unless-stopped
    stdin_open: true
    tty: true

FAQ

Q: Why use volume instead of package everything to image?
A: Because the config files and level storage are mutable and cannot simply be mounted... And if you really want to package them, you can simply use custom dockerfile.