ubuntu安装docker和docker-compose

 

 

ubuntu系统docker和安装,并安装docker-compose

  1. 安装docker
    apt install docker.io
  2. 设置docker为开机自启
    systemctl enable docker
  3. 安装docker-compose
    apt install docker-compose
  4. 修改配置,设置国内镜像仓库和本地镜像仓库
    vi /etc/docker/daemon.json
{
 "registry-mirrors": ["http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn"],
    "insecure-registries":["1.88.149.108:61010", "harbor.xxx.com:40180"]
}
  1. 重启docker
    systemctl restart docke

  2. 登录harbor
    docker login harbor.xxx.com:40180

  3. 测试是否安装成功


docker -v
docer-compose -v
posted @ 2023-08-08 11:16  田园将芜胡不归啊  阅读(728)  评论(0编辑  收藏  举报