黑松山资源网 Design By www.paidiu.com

前言

目前对docker支持最好的是Ubuntu系统,docker不支持在windows上运行,必须借助docker-machine。docker提供了toolbox用于在windows和mac平台安装docker。

工具箱包括:

      docker machine

      Docker Engine

      Kitematic

      docker命令行运行环境

      Oracle VM VirtualBox

安装之前需要检查BIOS中虚拟化的设置是否已打开,参考此页面

1、下载安装文件

https://www.docker.com/toolbox

2、双击安装文件进行安装

3、运行docker run hello-world

运行时出现下面的问题

Post http://127.0.0.1:2375/v1.20/containers/create: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it..
 * Are you trying to connect to a TLS-enabled daemon without TLS"htmlcode">
docker-machine regenerate-certs default
docker-machine restart default

显示环境变量:

 $ docker-machine env default --shell sh
  export DOCKER_TLS_VERIFY="1"
  export DOCKER_HOST="tcp://192.168.99.100:2376"
  export DOCKER_CERT_PATH="C:\Users\apex\.docker\machine\machines\default"
  export DOCKER_MACHINE_NAME="default"
  # Run this command to configure your shell:
  # eval "$(E:\04_Program Files\docker_toolbox\Docker Toolbox\docker-machine.exe env default)"

设置环境变量:

eval "$(docker-machine env default --shell sh)"

再次运行:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
af340544ed62: Pulling image (latest) from docker.io/library/hello-world
af340544ed62: Pulling image (latest) from docker.io/library/hello-world, endpoint: https://registry-1.docker.io/v1/
af340544ed62: Pulling dependent layers
535020c3e8ad: Pulling metadata
535020c3e8ad: Pulling fs layer
535020c3e8ad: Download complete
af340544ed62: Pulling metadata
af340544ed62: Pulling fs layer
af340544ed62: Download complete
af340544ed62: Download complete
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-machine ssh default
sudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=http://efa65984.m.daocloud.io |g" /var/lib/boot2docker/profile
exit
docker-machine restart default

注意

docker用户的密码是tcuser

可用于winscp传输文件

总结

以上就是在Windows系统上安装docker窗口的配置过程,文中给出了详细的步骤介绍,希望对大家的学习或者工作带来一定的帮助,如果有疑问大家可以留言交流。

黑松山资源网 Design By www.paidiu.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
黑松山资源网 Design By www.paidiu.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。