用Hello World校验Docker的安装

简介: 用Hello World校验Docker的安装 用Docker运行Hello World镜像,命令如下: # docker run hello-world Unable to find image 'hello-world:latest' locally ...

用Hello World校验Docker的安装

用Docker运行Hello World镜像,命令如下:

# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
535020c3e8ad: Pull complete 
af340544ed62: Pull complete 
Digest: sha256:a68868bfe696c00866942e8f5ca39e3e31b79c1e50feaee4ce5e28df2f051d5c
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.
 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 Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/ 

可见,Docker注册服务器从Docker Hub获取到最新的Hello World镜像,下载到了本地。可以再次运行Hello World镜像。

# docker run hello-world

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.
 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 Hub account:
 https://hub.docker.com

For more examples and ideas, visit:
 https://docs.docker.com/userguide/ 

可见,Hello World镜像运行成功,Docker的安装也没有问题。

目录
相关文章
|
8天前
|
Docker 容器
Docker安装及镜像源修改
本文介绍了Docker的安装过程和如何修改Docker镜像源以加速下载。包括更新系统包、安装所需软件包、设置yum源、安装Docker以及验证安装是否成功。接着,提供了修改Docker镜像源的步骤,包括创建配置文件、编辑配置文件以设置镜像加速地址,并提供了几个常用的国内镜像源地址。最后,通过重启Docker服务和检查配置是否生效来完成镜像源的修改。
Docker安装及镜像源修改
|
9天前
|
Docker 容器
centos7.3之安装docker
centos7.3之安装docker
|
1月前
|
NoSQL 关系型数据库 Redis
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
mall在linux环境下的部署(基于Docker容器),docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongodb、minio详细教程,拉取镜像、运行容器
mall在linux环境下的部署(基于Docker容器),Docker安装mysql、redis、nginx、rabbitmq、elasticsearch、logstash、kibana、mongo
|
1月前
|
Ubuntu Linux Docker
Ubuntu 18.04 安装Docker实战案例
关于如何在Ubuntu 18.04系统上安装Docker的实战案例,包括安装步骤、配置镜像加速以及下载和运行Docker镜像的过程。
163 3
Ubuntu 18.04 安装Docker实战案例
|
1月前
|
存储 Linux Docker
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
关于如何在CentOS 7.6上安装Docker、介绍Docker存储引擎以及服务进程关系的实战案例。
93 3
CentOS 7.6安装Docker实战案例及存储引擎和服务进程简介
|
19天前
|
Prometheus 监控 Cloud Native
docker安装prometheus+Granfan并监控容器
【9月更文挑战第14天】本文介绍了在Docker中安装Prometheus与Grafana并监控容器的步骤,包括创建配置文件、运行Prometheus与Grafana容器,以及在Grafana中配置数据源和创建监控仪表盘,展示了如何通过Prometheus抓取数据并利用Grafana展示容器的CPU使用率等关键指标。
|
2月前
|
消息中间件 Docker 容器
消息中间件RabbitMQ---Docker安装RabbitMQ、以及RabbitMQ的基本使用【二】
这篇文章提供了RabbitMQ的安装和基本使用教程,包括如何使用Docker拉取RabbitMQ镜像、创建容器、通过浏览器访问管理界面,以及如何创建交换机、队列、绑定和使用direct、fanout和topic三种类型的交换器进行消息发布和接收的测试。
消息中间件RabbitMQ---Docker安装RabbitMQ、以及RabbitMQ的基本使用【二】
|
2月前
|
关系型数据库 MySQL Java
腾讯云服务器的使用、服务器中使用Docker安装常见的软件、如何将一个项目发布到服务器
这篇文章介绍了在腾讯云服务器上使用Docker安装常见软件的过程,包括安装MySQL、Redis和Tomcat,并提供了解决连接问题的方法。同时,还涉及了服务器中安装JDK 1.8的步骤和如何将项目打包部署到服务器上的指导,包括注意事项和操作提示。
腾讯云服务器的使用、服务器中使用Docker安装常见的软件、如何将一个项目发布到服务器
|
2月前
|
Ubuntu Docker 索引
2024年最新版 Ubuntu 20+ 上安装 Docker
这篇文章提供了在Ubuntu 20+版本上安装Docker的详细步骤,包括更新软件包索引、安装依赖包、添加Docker官方GPG密钥、设置Docker稳定版仓库、安装Docker CE以及验证安装是否成功,并指导如何将用户添加到docker组以非root用户身份运行Docker。
|
2月前
|
存储 搜索推荐 应用服务中间件
深入探索Docker 安装 Tomcat
【8月更文挑战第26天】
44 4
下一篇
无影云桌面