docker

作者: ayunga | 来源:发表于2022-03-03 15:16 被阅读0次

Ubuntu 20.04 下载安装docker

$ curl -fsSL get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh --mirror Aliyun

启动docker

$ sudo systemctl enable docker
$ sudo systemctl start docker 

建立docker用户组

$ sudo groupadd docker    #添加docker 用户组
$ sudo gpasswd -a $USER docker    #$USER 就是$USER, 不用写成自己的用户名
$ newgrp docker       #更新用户组
$ docker ps      #这时不会再提示权限不足了

测试docker是否安装成功

出现以下信息表明安装成功

$ sudo docker run hello-world

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b8dfde127a29: Pull complete
Digest: sha256:308866a43596e83578c7dfa15e27a73011bdd402185a84c5cd7f32a88b501a24
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

相关文章

  • docker学习

    docker镜像 docker容器 docker仓库 安装docker docker版本 docker分为社区版和...

  • Docker安装和运行

    获取Docker 安装Docker 验证安装 1、获取Docker Docker for Mac Docker f...

  • Docker知识手册

    Docker 容器 启动docker:docker start 查看docker运行状态:docker stats...

  • Docker简介

    章节介绍 # Docker是什么# Docker包括什么# Docker镜像# Docker编配# Docker还...

  • Docker 常用操作

    Docker docker: 18.09.4、nvidia-docker: 2.0.3 docker 19.03 ...

  • rancher+harbor离线安装

    安装docker,此docker为社区版docker。docker官方文档:https://docs.docker...

  • Linux之Docker

    Linux之Docker 目录 Docker简单介绍 在线Docker安装 离线Docker安装 Docker简单...

  • Docker常用命令

    Docker常用命令 Docker帮助命令 docker version:查看docker版本 docker in...

  • Docker基础操作

    Docker部署 Docker安装 镜像加速 Docker 基础命令 Docker镜像管理 搜索镜像docker ...

  • docker容器状态查看命令集

    docker inspect 用法 : docker inspect [docker名称/docker short...

网友评论

      本文标题:docker

      本文链接:https://www.haomeiwen.com/subject/hffurrtx.html