LomotHo / minecraft-bedrock

a bedrock minecraft PE Server on docker (MCPE) 1M pulls🎉!
Apache License 2.0
134 stars 21 forks source link

Manually Setting the Version #8

Closed pogzie closed 5 years ago

pogzie commented 5 years ago

There is a new version out today, upon reviewing your source code, I saw that the ENV variable CORE_VERSION is used to get the version from https://minecraft.azureedge.net/bin-win/bedrock-server-1.12.0.28.zip

I set environment variable CORE_VERSION to 1.12.0.28 but it did not work. Anything wrong?

LomotHo commented 5 years ago

did you rebuild the image, If you dont know how to build a docker image, just wait for a while, new image is comming soon.

LomotHo commented 5 years ago

new version is ready

pogzie commented 5 years ago

Do i also need to edit IMAGE_VERSION ?

If i understand correctly, I can pass an ENV variable like this:

docker run -d --restart=always -it --name mcpe \
  -v /opt/mcpe-data:/data \
  -p 19132:19132/udp lomot/minecraft-bedrock:1.12.0.28-r1 \
  -env CORE_VERSION=1.12.0.28  

Which should overwrite what is defined on the Dockerfile, correct? I would like to understand this so that the next time that theres a version update, the users would be able to just change to the current version (or use an older version).

LomotHo commented 5 years ago

the ENV CORE_VERSION & IMAGE_VERSION are only used when building the image. you need to build the image frist, then tag the image, like 1.12.0.28-r1, 1.11.4.2-r1 etc. after that the image lomot/minecraft-bedrock:1.12.0.28-r1 & lomot/minecraft-bedrock:1.11.4.2-r1 will be available.

To use older version, just change to the older image,

docker run -d --restart=always -it --name mcpe \
  -v /opt/mcpe-data:/data \
  -p 19132:19132/udp lomot/minecraft-bedrock:old-version

you can find older version here: https://hub.docker.com/r/lomot/minecraft-bedrock/tags

pogzie commented 5 years ago

Possible to file a feature request to enable CORE_VERSION & IMAGE_VERSION as a settable environment value upon launching a container?

LomotHo commented 5 years ago

there is no reason to do this