Dokcer常用命令

1.查看docker版本

bash 复制代码
docker -v

2.查看docker镜像

bash 复制代码
sudo docker images

3.运行名为ubuntu-puf的镜像

bash 复制代码
sudo docker run -itd --name ubuntu-puf ubuntu

4.进入名为ubuntu-puf的ubuntu镜像

bash 复制代码
sudo docker exec -it ubuntu-puf /bin/bash

5.遇到启动错误时"The container name xxx is already in use by xxx"

直接重启即可

bash 复制代码
docker restart 镜像名
相关推荐
Patrick_Wilson2 天前
从「改个端口」到 502:Next.js on k8s 的容器端口、Service 映射与 env 覆盖
docker·kubernetes·next.js
Suroy3 天前
DockerView-Go:用 Go 写一个终端 Docker 监控工具,顺便做了个 Web 仪表盘
docker
云恒要逆袭3 天前
运行你的第一个Docker容器
后端·docker·容器
宋均浩4 天前
# Docker 镜像瘦身实战:从 1.2G 到 80MB 的五个优化步骤
ci/cd·docker
程序员老赵5 天前
10 分钟部署 OpenCode:Docker 一键安装,浏览器打开就能用 AI 写代码(附完整命令与排错)
docker·容器·ai编程
WangMingHua1115 天前
LM Studio Docker 部署——本地大模型一键启动
docker
曲幽6 天前
别再用网页翻译看源码了!你的私人翻译神器LibreTranslate,部署避坑指南来了
python·docker·web·pot·translate·libretranslate·arogstranslate
武子康8 天前
调查研究-183 Apple container:Mac 上用轻量 VM 跑 Linux 容器,Swift 会改写本地容器体验吗?
docker·容器·apple
Alsn8611 天前
等待学习-学习目录:Docker 容器安全攻防
学习·安全·docker
程序员老赵11 天前
服务器没有桌面?Docker 跑个 Chrome,浏览器就能远程用
docker·容器·devops