Docker on windows

Docker For Windows Introduction

声明: 此文档适用于 win10 系统上安装使用 Docker,win10 及以上推荐安装 docker for windows,win10 以下安装 docker Toolbox

Requirements

  • Windows 10
  • shell 推荐使用 git bash
  • Docker Desktop Installer (win10以上使用,win10以下找docker Toolbox,后面有博客链接,有兴趣和需要的小伙伴可以去尝试)

Install docker for windows

参考菜鸟: https://www.runoob.com/docker/windows-docker-install.html

Config Mirror Accelerator

菜鸟: https://www.runoob.com/docker/docker-mirror-acceleration.html

Operation Docker

关于 Docker 镜像的操作,以及容器的操作,网上有很多,这里可以提供几个链接,希望有所帮助 🌝

🔗 docker 官方文档:https://docs.docker.com/get-started/

🔗 一小时入门 Docker: https://zhuanlan.zhihu.com/p/23599229

🔗 菜鸟—docker安装ubuntu: https://www.runoob.com/docker/docker-install-ubuntu.html

🔗 win10 以下使用:docker Toolbox : https://blog.csdn.net/vitaair/article/details/80894890

Error

  • docker run -it ubuntu /bin/bash Except: … file not found
    • 原因:bash 路径问题
    • 解决:更改命令为:docker run -it ubuntu D:Program files/Git/usr/bin/bash
      • Except: … "/Program/ file not found
        • 原因: "安装路径中:“programs files” 路径中出现空格
    • 再次解决:
      1. D:Program files/Git/usr/bin 添加到环境变量中,由于公司电脑没有给予超级管理员权限,只能添加路径到 用户的环境变量中;
      2. 更改命令为: docker run -it ubuntu bash 完美运行!
  1. 更改命令为: docker run -it ubuntu bash 完美运行!
  • 1
    点赞
  • 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
Docker 是 PaaS 提供商 dotCloud 开源的一个基于 LXC 的高级容器引擎,源代码托管在 Github 上, 基于go语言并遵从Apache2.0协议开源。 Docker自2013年以来非常火热,无论是从 github 上的代码活跃度,还是Redhat在RHEL6.5中集成对Docker的支持, 就连 Google 的 Compute Engine 也支持 docker 在其之上运行。 一款开源软件能否在商业上成功,很大程度上依赖三件事 - 成功的 user case(用例), 活跃的社区和一个好故事。 dotCloud 自家的 PaaS 产品建立在docker之上,长期维护且有大量的用户,社区也十分活跃,接下来我们看看docker的故事。 环境管理复杂 - 从各种OS到各种中间件到各种app, 一款产品能够成功作为开发者需要关心的东西太多,且难于管理,这个问题几乎在所有现代IT相关行业都需要面对。 云计算时代的到来 - AWS的成功, 引导开发者将应用转移到 cloud 上, 解决了硬件管理的问题,然而中间件相关的问题依然存在 (所以openstack HEAT和 AWS cloudformation 都着力解决这个问题)。开发者思路变化提供了可能性。 虚拟化手段的变化 - cloud 时代采用标配硬件来降低成本,采用虚拟化手段来满足用户按需使用的需求以及保证可用性和隔离性。然而无论是KVM还是Xen在 docker 看来,都在浪费资源,因为用户需要的是高效运行环境而非OS, GuestOS既浪费资源又难于管理, 更加轻量级的LXC更加灵活和快速 LXC的移动性 - LXC在 linux 2.6 的 kernel 里就已经存在了,但是其设计之初并非为云计算考虑的,缺少标准化的描述手段和容器的可迁移性,决定其构建出的环境难于迁移和标准化管理(相对于KVM之类image和snapshot的概念)。docker 就在这个问题上做出实质性的革新。这是docker最独特的地方。 VM技术和容器技术对比 VM技术和容器技术对比 面对上述几个问题,docker设想是交付运行环境如同海运,OS如同一个货轮,每一个在OS基础上的软件都如同一个集装箱,用户可以通过标准化手段自由组装运行环境,同时集装箱的内容可以由用户自定义,也可以由专业人员制造。这样,交付一个软件,就是一系列标准化组件的集合的交付,如同乐高积木,用户只需要选择合适的积木组合,并且在最顶端署上自己的名字(最后个标准化组件是用户的app)。这也就是基于docker的PaaS产品的原型。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值