docker学习笔记一:安装##


mac安装docker###

docker官方文档上有这么一段话:

Because the Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in OS X. Instead, you must use docker-machine to create and attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker for you on your Mac

由于docker使用了特定的Linux内核功能,因此不能用原生的方式在os x上运行docker,只能使用docker-machine去创建docker并将它绑定到linux虚拟机上。

注意:只能在OS X 10.8以上的版本的mac上安装docker。

安装步骤###

  1. 如果你有VirtualBox正在运行,需要首先关闭正在运行的VirtualBox。

  2. 下载页面下载docker toolbox。

  3. 下载完毕,执行安装,安装完毕如下图:

  4. 执行最简单一个docker命令

    docker run hello-word // 这个命令会从dockerhub下载hello-world镜像

  5. 执行上图的中建议的命令

    docker run -it ubuntu bash // 会在本地安装ubuntu的镜像

    通过docker images 命令可以查看到刚才下载到本地的镜像


问题###

  1. 执行命令:
sudo docker commit -m "add nginx from ubuntu" -a "hwy1782" 60fff3da025c hwy1782/ubuntu-nginx:v1
报如下错误:
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

github上有相关的issue:

https://github.com/docker/kitematic/issues/1010


参考文献

  1. Docker简明教程
  2. Docker via Homebrew
  3. Mac OS X

最新文章

  1. [leetcode] 题型整理之图论
  2. qt QMetaObject::connectSlotsByName()自动关联失效问题解决
  3. iOS button文字居中
  4. linux安装桌面环境(GNOME)VNC连接Linux
  5. String.Format格式说明(转)
  6. Linux系统搭建负载均衡环境
  7. SELECT--UNION,UNION ALL,MINUS, INTERSECT,EXISTS
  8. 微信jsapi支付的坑
  9. [转]HTTPS连接的前几毫秒发生了什么
  10. 团队作业4——第一次项目冲刺(Alpha版本)2017.4.28
  11. iOS 提交AppStore不出现构建的版本
  12. [APIO2015]八邻旁之桥
  13. vue组件详解(三)——组件通信
  14. hdu6026 Deleting Edges(Dijkstra+思路)
  15. 【linux】linux下准确查询正在tomcat下运行的java进程。准确获取正在运行的java进程的PID
  16. 剑指Offer 51. 构建乘积数组 (数组)
  17. 黄聪:Pjax 无刷新开发web,更好用户体验
  18. Opencv4.0:遍历Mat图像空间、读取摄像头
  19. Application_Start 多次启动问题
  20. Java开发者需要学习的移动开发编程语言

热门文章

  1. Python—HTTP处理Gzip压缩数据
  2. flutter vscode插件
  3. HDU 1561 The more, The Better【树形DP/有依赖的分组背包】
  4. python——聊聊iterable,sequence和iterators
  5. 子查询在UPDATE 语句中的应用
  6. poj 3225 Help with Intervals(线段树,区间更新)
  7. 【推导】【暴力】Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) C. Five Dimensional Points
  8. 将springboot配置文件中的值注入到静态变量
  9. Word中将图表变为表格
  10. C#-java RSA加密解密