码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • ubuntu中Docker 容器正在运行,但未在 docker ps 中显示


    ubuntu中查看docker ps发现内容为空,但是容器在运行

    查看docker ps

    1. root@hello:~# docker ps
    2. CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

    查看docker info

    结果发现

     Docker Root Dir: /var/snap/docker/common/var-lib-docker

    注意,这里是snap版的docker,常见的问题是apt版和docker版同时安装了,

    查看sanp软件列表

    1. hello@hello:/root$ snap list
    2. Name Version Rev Tracking Publisher Notes
    3. core18 20220706 2538 latest/stable canonical✓ base
    4. docker 20.10.14 1779 latest/stable canonical✓ -
    5. snapd 2.56.2 16292 latest/stable canonical✓ snapd

    可以看到有一个sanp版的docker

    查看apt列表

    1. hello@hello:/root$ apt list --installed | grep 'docker'
    2. WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
    3. docker-ce/bionic,now 5:20.10.16~3-0~ubuntu-bionic amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-bionic]
    4. docker-ce-cli/bionic,now 5:20.10.16~3-0~ubuntu-bionic amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-bionic]
    5. docker-ce-rootless-extras/bionic,now 5:20.10.16~3-0~ubuntu-bionic amd64 [installed,upgradable to: 5:20.10.17~3-0~ubuntu-bionic]
    6. docker-compose-plugin/bionic,now 2.5.0~ubuntu-bionic amd64 [installed,upgradable to: 2.6.0~ubuntu-bionic]
    7. docker-scan-plugin/bionic,now 0.17.0~ubuntu-bionic amd64 [installed]

    可以看到也有一个apt版的docker

    两个版本的docker安装上肯定有冲突,所以解决方案就是卸载掉snap版的docker后重启

    1. #卸载snap版docker
    2. sudo snap remove docker
    3. #重启
    4. reboot

  • 相关阅读:
    【spring mvc】配置默认Servlet处理器
    Android学习笔记 30. Service组件
    原生input使用+v-model在input中使用
    Visual Studio Code (VS Code)安装教程
    vector_angle_to_rigid
    Cesium实现动态旋转四棱锥(2023.9.11)
    ClipboardJS——开发学习总结1
    【leetcode】【2022/8/18】1224. 最大相等频率
    AI 卷到正经「挖矿」业,卡内基科学研究所另辟蹊径,靠关联分析法找到新矿床
    线程安全问题
  • 原文地址:https://blog.csdn.net/gsls200808/article/details/126096713
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号