前言
好久没弄过docker了,今天重新安装一下,也是很简单。重新学习下docker,搭建新的东西出来。
安装
brew cask install docker
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 58, done.
remote: Counting objects: 100% (58/58), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 445704 (delta 30), reused 17 (delta 7), pack-reused 445646
Receiving objects: 100% (445704/445704), 201.37 MiB | 1.81 MiB/s, done.
Resolving deltas: 100% (315755/315755), done.
Tapped 1 command and 3580 casks (3,695 files, 216MB).
==> Downloading https://desktop.docker.com/mac/stable/45519/Docker.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'docker'.
==> Installing Cask docker
==> Moving App 'Docker.app' to '/Applications/Docker.app'.
🍺 docker was successfully installed!
打开Docker.app进入教程
- 下载教程例子
- 编译
-
运行容器
image.png
- 保存提交镜像
运行例子,进入容器内部
image.png我们查看下nginx进程,可以看到进程nginx运行着。
我的docker版本
$ docker version|grep Version
Version: 19.03.8
Version: 19.03.8
Version: v1.2.13
Version: 1.0.0-rc10
Version: 0.18.0
网友评论