Docker for windows


在这里插入图片描述

Docker的安装

到官网下载:
https://docs.docker.com/docker-for-windows/install/
915MB而已,下载好然后安装,但是安装完后要重启
安装完成后双击图标启动docker
在这里插入图片描述

查看版本

1、在右下角docker图标上点击,选择“关于”
在这里插入图片描述
在这里插入图片描述
2、查看版本信息,打开命令窗口,输入:docker version
在这里插入图片描述
3、或者输入:docker --version
在这里插入图片描述
运行中的docker状态
在这里插入图片描述

hello-world

打开命令窗口,输入:docker run hello-world
在这里插入图片描述
docker会在本地找hello-world镜像,如果本地没有就自动会去docker hub下载,并创建一个容器
查看镜像,输入:docker image ls
在这里插入图片描述
查看所有容器:docker container ls --all
在这里插入图片描述

ubuntu

创建容器:docker run --interactive --tty ubuntu bash
在这里插入图片描述
注意docker是依赖于宿主机的操作系统的,如果是windows的环境,要切换到linux环境是不可以的,应该本身就是linux环境才行。
在这里插入图片描述
在这里插入图片描述

 Docker.Core.DockerException:
  Error response from daemon: open \\.\pipe\docker_engine_linux: The system cannot find the file specified.
  
     在 Docker.Backend.DockerDaemonChecker.Check(Func`1 isDaemonProcessStillRunning)
     在 Docker.Backend.BackendNamedPipeServer.<Run>b__8_2(Object[] args)
     在 Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.<Register>b__0(Object[] parameters)
     在 Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)

需要重置环境
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
实在不行就重启吧,没有是是重启解决不了的

nginx

拉取nginx镜像:docker run --detach --publish 8080:80 --name webserver nginx
报错如下:
在这里插入图片描述
解决:对于我的环境由于安装了VMWare,和HyperV冲突了,暂时没有解决办法,还是使用VMWare吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Docker on Windows by Elton Stoneman English | 14 July 2017 | ISBN: 1785281658 | 358 Pages | AZW3/EPUB/MOBI/PDF (conv) | 23.77 MB Key Features Start building applications as Docker images and running containers in a Windows production environment Design and implement distributed applications that run across multiple networked containers Build a full Continuous Deployment pipeline for a .NET Core application running on Windows Book Description Docker has become hugely popular because it offers benefits at all stages of software design and delivery. Until recently, it was impossible to use a Windows Server platform to host the Docker Engine without adding an additional layer of virtualization. Starting with Windows Server 2016, you are able to use Docker on Windows and take advantage to easily build, deploy, and run Windows Containers. From building and running simple images to designing and implementing distributed applications, this book will teach everything you need to know while using Docker on Windows. You will start by installing Docker on different versions of Windows and Windows Server, and run a simple container to verify that the setup is working correctly. You will see how to build Docker images with a Dockerfile for a simple website, and then run it on Windows. Moving on, we'll cover the practical usage of Docker and the tools in the Docker ecosystem, such as Docker Compose, Docker Trusted Registry, and Docker Swarm Mode. Then, you'll be able to apply that knowledge by building a full continuous deployment pipeline for a .NET Core application running on Windows. We'll also dive deep into some of the core features of Docker, such as networking and security. At the end of the book, you'll be guided through a business case that will help you practically implement Docker in a real-world scenario. What you will learn Understand how Docker works, build images, and run containers Run Docker on different versions of Windows, and on the cloud with Azure Des

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值