Skip to content

Instantly share code, notes, and snippets.

@bazwilliams
Last active October 6, 2018 17:41
Show Gist options
  • Save bazwilliams/e7b05ffbab5372fdb14781a5263e34e2 to your computer and use it in GitHub Desktop.
Save bazwilliams/e7b05ffbab5372fdb14781a5263e34e2 to your computer and use it in GitHub Desktop.
Dockerfile to run the Minecraft bedrock server https://minecraft.net/en-us/download/server/bedrock/
FROM ubuntu:latest AS minecraft
ADD https://minecraft.azureedge.net/bin-linux/bedrock-server-1.6.1.0.zip /
RUN mkdir /minecraft
WORKDIR /minecraft
RUN apt-get update && apt-get install -y unzip
RUN unzip /bedrock-server-1.6.1.0.zip
FROM ubuntu:latest
RUN apt-get update && apt-get install -y libcurl4 libssl1.0.0
COPY --from=minecraft /minecraft /minecraft
ENV LD_LIBRARY_PATH=/minecraft
WORKDIR /minecraft
CMD './bedrock_server'
@bazwilliams
Copy link
Author

bazwilliams commented Oct 6, 2018

Build

docker build -t bedrock-server .

Run

docker run --network=host -ti bedrock-server

You can mount /minecraft/worlds folder to persist worlds between containers and optionally pass in a server.properties file.

For example:

docker run --network=host -v <server.properties>:/minecraft/server.properties -v <worlds/>:/minecraft/worlds -ti bedrock-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment