Last active
March 27, 2021 16:28
-
-
Save itzg/fe3cb6d2b9ee6a9d817885582c0a458f to your computer and use it in GitHub Desktop.
A procedure to convert anonymous itzg/minecraft-server data volume to a named one
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
# The following will convert the /data from an existing container named "mc" | |
# into a named volume "mc" and then create a new, re-configured container | |
# named "mc-new". | |
# Keep the old container named "mc" until you have confirmed everything is good | |
# and then you can cleanup using `docker rm mc` | |
docker stop mc | |
docker run --rm --volumes-from mc -v mc:/new alpine cp -avT /data /new | |
docker run -it --name mc-new -v mc:/data -p 25565:25565 -e EULA=TRUE -e MEMORY=2G itzg/minecraft-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment