启动/删除Docker容器时出现问题 - 如何修复

解道jdon 2021-05-04 09:26:29
docker 容器 删除 启动 出现问题


使用Docker过程中,运行docker-compose up或docker run时,出现Conflict. The name W is already in use by container XYZ. You have to delete..或"Conflict, cannot remove the default name of the container..." 

或:Conflict. The name "XYZ" is already in use by container hexacode. You have to delete (or rename) that container to be able to reuse that name.

我们无法启动容器,因为该名称已在使用中。运行docker ps命令,又看不到。

运行docker ps -a

找到你的容器,复制它的Id号,然后运行:

docker rm 85c2981e63f6 26ea04f41ab3 

删除后,再运行docker-compose up

第二种方法是从/ var下手动删除剩余的文件。具体来说,可以在/ var / lib / docker / containers /下找到这些文件。每个容器目录都有一个超长的哈希标识符,里面有大量丑陋的JSON输出。如果搜索与所需容器名称匹配的特定字符串,则会找到包含其配置文件的相关目录。

删除与名称搜索匹配的父目录,然后重新启动Docker服务。之后,您应该可以再次使用您的名字。

版权声明
本文为[解道jdon]所创,转载请带上原文链接,感谢
https://www.jdon.com/50883

  1. UML和Java的阻抗
  2. The Java application server is dead
  3. There is a problem with Tomcat session
  4. Java + Internet architecture talents
  5. UML and Java
  6. 深入理解Linux内核之内核线程(上)
  7. 如何看待明尼苏达大学因插入实验性漏洞,被禁止贡献 Linux 内核代码?
  8. 梁金荣:使用eBPF追踪LINUX内核
  9. Docker study notes (2)
  10. Deep understanding of kernel threads in Linux kernel (Part one)
  11. How do you think the University of Minnesota is forbidden to contribute Linux kernel code because of the experimental loophole?
  12. Liang Jinrong: tracking Linux kernel with ebpf
  13. 2021Java最新学习路线图新鲜出炉
  14. New learning roadmap for 2021 Java
  15. Spring MVC 的Controller 结构问题
  16. 【烂KDE】Linux登录时用户密码正确,却登录失败
  17. Controller structure of spring MVC
  18. [KDE] when Linux logs in, the user password is correct, but the login fails
  19. HttpSession对象与Cooike的关系 以及 Cookie对象构造函数问题
  20. gRPC-Web:替代REST的gRPC的Javascript库包
  21. java call dll
  22. 用Java构建反应式REST API - Kalpa Senanayake
  23. The relationship between httpsession object and cooike and the construction of cookie object
  24. Grpc Web: a JavaScript library package to replace rest grpc
  25. java call dll
  26. Building reactive rest API with Java - kalpa Senanayake
  27. Five wonders. Feeling of visiting villa in spring
  28. Spring will be far away
  29. 最全面的SpringBoot配置文件详解
  30. 最全面的SpringBoot配置文件详解
  31. 微服务开发神器之JRebel 插件破解和实现本地及远程热部署教程
  32. 漫画 | 你还记得原生的JDBC怎么连接数据库吗?
  33. Java流及流操作示例
  34. The most comprehensive spring boot configuration file
  35. The most comprehensive spring boot configuration file
  36. Cracking and implementing jrebel plug-in of microservice development artifact
  37. Comic | do you remember how the native JDBC connects to the database?
  38. Java stream and stream operation example
  39. ftp连接windows与linux
  40. 装饰器设计模式 - Gene Zeiniss
  41. Spring 3中异步方法调用
  42. AOP相关讨论
  43. jf能支持的表现层目前只有struts 1.x么?
  44. 在j2ee中实现一般java对象数据库的方法。
  45. FTP connecting windows and Linux
  46. Decorator design pattern - gene zeiniss
  47. Asynchronous method call in spring 3
  48. Discussion on AOP
  49. Is struts 1. X the only presentation layer supported by JF?
  50. The method of realizing general Java object database in J2EE.
  51. PDF转HTML工具——用springboot包装pdf2htmlEX命令行工具
  52. Pdf to HTML tool -- Wrapping pdf2htmlex command line tool with springboot
  53. MySQL 的 in 查询不走索引?我拿什么拯救你!
  54. MySQL in query does not go index? What can I do to save you!
  55. PDF转HTML工具——用springboot包装pdf2htmlEX命令行工具
  56. Pdf to HTML tool -- Wrapping pdf2htmlex command line tool with springboot
  57. Java小白入门必学!最全数据类型和运算符笔记,附实例
  58. Java Xiaobai introduction must learn! Notes on the most complete data types and operators, with examples
  59. Spring MVC请求与响应
  60. Spring MVC request and response