2014-12-06 wcdj
摘要:本文记录Docker在OS X Yosemite的安装方法,也可参考Docker的这篇文章Installing Docker on Mac OS X。
0 介绍
Docker is a platform for developers and sysadmins to develop, ship, and run applications. Docker lets you quickly assemble applications from components and eliminates the friction that can come when shipping code. Docker lets you get your code tested and deployed into productionas fast as possible.
Docker consists of:
- The Docker Engine - our lightweight and powerful open source container virtualization technology combined with a work flow for building and containerizing your applications.
- Docker Hub - our SaaS service for sharing and managing your application stacks.
1 安装
下载最新的安装包:Boot2Docker-1.3.2.pkg,安装完成后如下图所示:
docker的默认安装目录:
docker的相关用法:
gerryyang@mba:docker$docker
Usage: docker [OPTIONS] COMMAND [arg...]
A self-sufficient runtime for linux containers.
Options:
--api-enable-cors=false Enable CORS headers in the remote API
-D, --debug=false Enable debug mode
-d, --daemon=false Enable daemon mode
-G, --group="docker" Group to assign the unix socket specified by -H when running in daemon mode
use '' (the empty string) to disable setting of a group
-H, --host=[] The socket(s) to bind to in daemon mode or connect to in client mode, specified using one or more tcp://host:port, unix:///path/to/socket, fd://* or fd://socketfd.
--tls=false Use TLS; implied by tls-verify flags
--tlscacert="/Users/gerryyang/.docker/ca.pem" Trust only remotes providing a certificate signed by the CA given here
--tlscert="/Users/gerryyang/.docker/cert.pem" Path to TLS certificate file
--tlskey="/Users/gerryyang/.docker/key.pem" Path to TLS key file
--tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)
-v, --version=false Print version information and quit
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders from a container's filesystem to the host path
create Create a new container
diff Inspect changes on a container's filesystem
events