感谢牛友的参考,以下是运行步骤:SSH 进去终端,root 先
docker run -it --entrypoint /bin/bash johngong/baidunetdisk
先运行docker镜像先,等输入框出来就输入下面这一堆代码
echo "echo \"$(cat /etc/cont-env.d/APP_NAME)\"" > /etc/cont-env.d/APP_NAME
echo "echo "$(cat /etc/cont-env.d/APP_VERSION)"" > /etc/cont-env.d/APP_VERSION
echo "echo "$(cat /etc/cont-env.d/DOCKER_IMAGE_PLATFORM)"" > /etc/cont-env.d/DOCKER_IMAGE_PLATFORM
echo "echo "$(cat /etc/cont-env.d/TAKE_CONFIG_OWNERSHIP)"" > /etc/cont-env.d/TAKE_CONFIG_OWNERSHIP
echo "echo "$(cat /etc/cont-env.d/XDG_CACHE_HOME)"" > /etc/cont-env.d/XDG_CACHE_HOME
echo "echo "$(cat /etc/cont-env.d/XDG_CONFIG_HOME)"" > /etc/cont-env.d/XDG_CONFIG_HOME
echo "echo "$(cat /etc/cont-env.d/XDG_DATA_HOME)"" > /etc/cont-env.d/XDG_DATA_HOME
echo "echo "$(cat /etc/cont-env.d/XDG_RUNTIME_DIR)"" > /etc/cont-env.d/XDG_RUNTIME_DIR
echo "echo "$(cat /etc/cont-env.d/XDG_STATE_HOME)"" > /etc/cont-env.d/XDG_STATE_HOME
echo "echo "$(cat /etc/cont-groups.d/cinit/id)"" > /etc/cont-groups.d/cinit/id
echo "echo "$(cat /etc/cont-groups.d/staff/id)"" > /etc/cont-groups.d/staff/id
echo "echo "$(cat /etc/cont-groups.d/nogroup/id)"" > /etc/cont-groups.d/nogroup/id
echo "echo "$(cat /etc/cont-groups.d/root/id)"" > /etc/cont-groups.d/root/id
echo "echo "$(cat /etc/cont-groups.d/shadow/id)"" > /etc/cont-groups.d/shadow/id
echo "echo "$(cat /etc/cont-users.d/_apt/id)"" > /etc/cont-users.d/_apt/id
echo "echo "$(cat /etc/cont-users.d/_apt/gid)"" > /etc/cont-users.d/_apt/gid
echo "echo "$(cat /etc/cont-users.d/_apt/home)"" > /etc/cont-users.d/_apt/home
echo "echo "$(cat /etc/cont-users.d/root/id)"" > /etc/cont-users.d/root/id
echo "echo "$(cat /etc/cont-users.d/root/gid)"" > /etc/cont-users.d/root/gid
echo "echo "$(cat /etc/cont-users.d/root/home)"" > /etc/cont-users.d/root/home
echo "echo "$(cat /etc/cont-users.d/root/grps)"" > /etc/cont-users.d/root/grps
等结束后,/init输入看看有没错误,没有错误后然后再新开 ssh 输入 docker ps -a,能看到现有的容器列表,找到 johngong/baidunetdisk,看它最前面的 id
输入 docker commit ID baidunetdisk,就能生成一个名字叫 baidunetdisk 的镜像了,回到飞牛的网页端进入 docker 的本地镜像也能找到它然后部署就可以了,设置里面命令那栏如果空白了就加上/init