我一直在用最难的时间,我通过Docker运行Minecraft服务器,我需要编辑配置,上传文件夹/配置等等到服务器。显而易见的方法是通过FTP进入主机访问“同步”#39;文件夹通过主机的文件系统。我试过了:
docker run -v `pwd`/src/mc:/home/minecraft/mcmyadmin/Minecraft jchaney/mcmyadmin
但/ src / mc文件夹为空,容器永远不会工作:
McMyAdmin Updater - 2.2.0.0
Running in 64-bit mode.
Notice : Detecting System...
Notice : No virtualized environment detected.
Notice : Linux Distribution: Unknown Distribution
Notice : Detection complete.
Warning : No Minecraft configuration file found (Normal on a first start)
Notice : Detected Java runtime version 1.7.0
Notice : Checking for Minecraft Server updates...
Notice : Updating Minecraft server...
Notice : Downloading latest Minecraft server...
Notice : Error downloading file.
Downloading Game Server: -1%Notice : Download failed!
Notice : Starting McMyAdmin Personal v2.5.2.4
Warning : No saved group information was found. Loading Defaults.
Notice : Upgraded 4 legacy groups
Notice : No saved schedule was found. Loading Defaults.
Notice : Checking for updates...
Notice : Checking for Minecraft Server updates...
Notice : Starting webserver...
Notice : McMyAdmin has started and is ready for use.
Notice : This is the first time McMyAdmin has been started.
Notice : You must complete the first-start wizard via the web interface.
它变得没有响应(并注意到下载错误)。
有什么想法吗?
如果不清楚,这些配置需要进行编辑,所以一开始的副本只能工作一次,重建它来编辑配置是不方便的。
答案 0 :(得分:0)
使用带有COPY命令的Dockerfile来构建包含您需要的所有配置/文件的容器。