-2

I run a Minecraft Bedrock server in a Docker container (image itzg/minecraft-bedrock-server). I pulled a newer version of the image, but the container keeps using the old one. The manuals I found on the Internet say that I have to create a new container with the new image. If I remove the old container, I lose my configuration and worlds. I know how to copy files from my container, but I don't know how to copy them safely to the new container. I suppose the Minecraft sever should be stopped before copying, but when I stop the server the container automatically shuts down.

What is the right way to get my Minecraft server updated?

Environment: a Linux distro runnig on NAS QNAP TS-664. I use Container Station as GUI for docker, and I have SSH access to the device.

0

1 Answer 1

0

I learnt about concept of volume on Docker storage page. An anonymous (i.e. with a randomly generated name) volume is created for each new container by default. Volume is just a directory managed by Docker where a particular container keeps its data. It's possible to create a separate volume with meaningful name, and then use it as an assigned volume for a new container.

How I resolved my issue:

  • Created a dedicated volume with meaningful name for my Minecraft server.
  • Found full path to the new volume.
  • Found the volume name of my old container (it is a long randomly generated string), and full path to it.
  • Copied data from old volume to the new one.
  • Created a new container with the new image and my new dedicated volume (there is a option to assign any volume).

Next time when I need to update my server, I just have to repeat the last step - creation of the new container.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .