docker 7.0.1版无法升级

手册方法是:

docker pull seafileltd/seafile-mc:latest
docker-compose down
docker-compose up -d

执行第二个命令显示:
Removing network root_seafile-net
执行第三个命令时显示:
Creating network “root_seafile-net” with the default driver Creating seafile-memcached Creating seafile-mysql ERROR: for db Cannot create container for service db: Conflict. The container name “/seafile-mysql” is already in use by container “64a77b181db2a48210d68e1036dd3bf9f4e618242ba5877e9af0b2e529a353e3”. You have to remove (or rename) that container to be able to reuse that name. ERROR: for memcached Cannot create container for service memcached: Conflict. The container name “/seafile-memcached” is already in use by container “a02d578d5590b76f01ff0640baa55fb9c88c9c00e458f9f5087019c16461e4cd”. You have to remove (or rename) that container to be able to reuse that name. ERROR: Encountered errors while bringing up the project.

你有两个同名的docker容器在运行,所以启动失败了

没有啊,seafile7版本以后,有3个容器,一个是本体,一个是数据库,还有一个memcached,并没有两个同名容器啊。

我这是升级,7.0.1想升级到最新,我不能删除原本的容器啊。

看来docker容器的概念没理解清楚,一个docker容器就是一套服务,你既然要升级这个服务,肯定避免不了要先替换该服务原来的旧文件啊,所以删掉旧容器是必要的。你要以最新版本的镜像再来运行一个新的容器。

容器不是类似于一个VPS嘛?里面有我的数据,如果我删除了,数据就没了啊。
虽然SF7版本后数据库是另外的容器,但好像并不表示seafile本体容器里面没有数据,至少数据库配置文件之类的就在里面,我如果手动删除原来的容器在手动安装新的容器……
那只能说DOCKER或者sf设计的也太差了,竟然没有升级系统。

你应该是不太了解docker的数据持久化吧,可以网上了解下docker的volumes。

已经解决 已经解决