Docker 常见命令

命令库:docker ps | Docker Docs

安装docker

复制代码
apt install docker.io

docker ps -a

作用:显示所有容器

docker logs -f frps

作用:持续输出容器名称为frps的日志信息(监控)

docker restart frps

作用:重启名字叫frps的docker容器

docker rm -f snowdreamtech-frpc-2

删除容器

Ubuntu中 创建Zerotier应用容器:

复制代码
docker run -d           \
  --name zt             \
  --restart=always      \
  --device=/dev/net/tun \
  --net=host            \
  --cap-add=NET_ADMIN   \
  --cap-add=SYS_ADMIN   \
  -v /var/lib/zerotier-one:/var/lib/zerotier-one zerotier/zerotier-synology:latest

常用命令:

#查看zerotier状态

复制代码
docker exec -it zt zerotier-cli status

#加入网络

复制代码
docker exec -it zt zerotier-cli join [xxxxxxxxxxxx]

安装docker

复制代码
sudo curl -fsSL https://gitee.com/tech-shrimp/docker_installer/releases/download/latest/linux.sh| bash -s docker --mirror Aliyun

拉取镜像

复制代码
sudo vi /etc/docker/daemon.json

{
    "registry-mirrors": [
        "https://docker.m.daocloud.io",
        "https://docker.1panel.live",
        "https://hub.rat.dev"
    ]
}

sudo service docker restart
相关推荐
学Linux的语莫7 分钟前
prometheus、grafana的docker搭建
docker·容器·prometheus
lisanmengmeng7 分钟前
zentao的prod环境升级(一)
linux·运维·数据库·docker·容器·禅道
kkoral22 分钟前
单机docker部署的redis sentinel,使用python调用redis,报错
redis·python·docker·sentinel
卡布叻_星星5 小时前
Docker之Windows与Linux不同架构部署理解
linux·windows·docker
weixin_462446235 小时前
【实战原创】Docker 清理指南:以 Coze Studio 为例的资源保留与清理实践(非万能方案)
docker·容器·eureka
hkNaruto5 小时前
【docker】docker exec -it 报错 open /dev/pts/0: operation not permitted
运维·docker·容器
米花町的小侦探5 小时前
WSL创建pgsql容器脚本
docker·postgresql
一个想打拳的程序员6 小时前
无需复杂配置!用%20docker-webtop%20打造跨设备通用%20Linux%20桌面,加载cpolar远程访问就这么简单
java·人工智能·docker·容器
深圳英康仕6 小时前
ARM工控机openEuler系统Docker安装指南
arm开发·docker·rk3588·工控机
山沐与山6 小时前
【Docker】Docker容器技术详解
运维·docker·容器