Deploying Docker to Amazon using Tutum explained how to deploy a Docker image to Docker Tutum. Tutum is now Docker Cloud.
Read Announcing Docker Cloud 자세한 내용은.

The key features of Docker Cloud are:
- Authentication using Docker ID
- Integration with Docker Hub
- Support for Docker official repositories
- Commercially supported Docker Engine
- Ability to deploy and scale your applications using GUI, API and CLI
This blog will show:
- Key concepts of Docker Cloud
- How to create a new Docker Cloud Node
- How to install Docker Cloud CLI
- How to create a new Docker Cloud Service
- Access Couchbase Server in Docker Cloud
- How to terminate the Docker Cloud Service and Node
And finally it’ll leave with some references for Docker Cloud docs.
The blog will use 카우치베이스 서버 – an open source, highly scalable, JSON document database for the Docker image.
Docker Cloud TL;DR
Here are the quick commands to run a Docker image using Docker Cloud in Amazon:
|
1 2 3 4 5 |
brew install 도커–클라우드 도커–클라우드 nodecluster 만들다 –t 1 —tag 카우치베이스 카우치베이스–node aws us–west–1 m3.large 도커–클라우드 service 만들다 —tag 카우치베이스 –p 8091:8091 –p 8092:8092 –p 8093:8093 –p 11210:11210 arungupta/카우치베이스 도커–클라우드 service start {SERVICE_ID} 도커–클라우드 service inspect {SERVICE_ID} | jq “.container_ports[0].endpoint_uri” | sed ‘s/tcp/http/g’ |
More details below.
Key Concepts of Docker Cloud
Let’s understand the core concepts of Docker Cloud:
- Nodes are individual Linux hosts/VMs used to deploy and run your applications. New nodes can be provisioned to increase the capacity. Docker Cloud does not provide hosting services. Nodes are provisioned using physical servers, virtual machine or cloud providers.
- Node Clusters are logical groups of nodes of the same type. Node Clusters allow to scale the infrastructure easily by provisioning more nodes.
- Services are logical groups of containers from the same image. Services make it simple to scale your application across different nodes.
Docker Cloud can be managed with Web, CLI 또는 REST API. This blog will use the Docker Cloud CLI to perform all the commands.
Install Docker Cloud CLI
Install Docker Cloud CLI:
|
1 2 3 4 5 |
brew install 도커–클라우드 ==< Downloading https://homebrew.bintray.com/bottles/docker-cloud-1.0.2.yosemite.bottle.tar.gz Already downloaded: /Library/Caches/Homebrew/도커–클라우드–1.0.2.yosemite.bottle.tar.gz ==< Pouring 도커–클라우드–1.0.2.yosemite.bottle.tar.gz ? /usr/local/Cellar/도커–클라우드/1.0.2: 482 files, 4.1M |
Complete installation instructions are at Installing CLI. Check version:
|
1 2 |
도커–클라우드 –v 도커–클라우드 1.0.2 |
Complete set of commands are:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
usage: 도커–클라우드 [–h] [–v] {action,컨테이너,event,exec,login,node,nodecluster,repository,실행,service,stack,tag,trigger,up} ... 도커 Cloud CLI optional arguments: –h, —help 보여주다 this help message 그리고 exit –v, —version 보여주다 program‘s version number 그리고 exit 도커 Cloud CLI commands: {action,컨테이너,event,exec,login,node,nodecluster,repository,실행,service,stack,tag,trigger,up} action Action–related operations 컨테이너 Container–related operations event Get real time 도커 Cloud 이벤트 exec Run a command in a running 컨테이너 login Please use “docker login” -로 로그 into 도커 Cloud node Node–related operations nodecluster NodeCluster–related operations repository Repository–related operations 실행 Create 그리고 실행 a 새로운 service service Service–related operations stack Stack–related operations tag Tag–related operations trigger Trigger–related operations up Create 그리고 deploy a stack |
Save the login credentials:
|
1 2 3 4 5 6 |
도커 login Username: arungupta Password: 이메일: arun.gupta@gmail.com WARNING: login credentials saved in /Users/arungupta/.도커/설정.json Login Succeeded |
Create new Docker Cloud Node
Register your cloud provider credentials with Docker Cloud Web UI as explained in Link to a Cloud Service Provider. Amazon, Digital Ocean, Azure, and other cloud providers are supported.
Create a new node cluster with a single node:
|
1 2 |
도커–클라우드 nodecluster 만들다 –t 1 —tag 카우치베이스 카우치베이스–node aws us–west–1 m3.large 42a34e04–02e1–47be–bf87–ec06e0e0b604 |
This node cluster has a single node (-t 1) and uses the tag “couchbase” (--tag couchbase). Last four parameters are nodecluster name (couchbase-node, provider (aws, region (us-west-1 and nodetype (m3.large).
Each node in this node cluster will be given the assigned tag. This will be used later to assign services to a specific node or node cluster.
Status of this node cluster can be checked:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
도커–클라우드 nodecluster inspect 42a34e04–02e1–47be–bf87–ec06e0e0b604 | jq { “disk”: 60, “uuid”: “42a34e04-02e1-47be-bf87-ec06e0e0b604”, “tags”: [ { “name”: “couchbase” } ], “current_num_nodes”: 1, “region”: “/api/infra/v1/region/aws/us-west-1/”, “target_num_nodes”: 1, “state”: “Deployed”, “node_type”: “/api/infra/v1/nodetype/aws/m3.large/”, “resource_uri”: “/api/infra/v1/nodecluster/42a34e04-02e1-47be-bf87-ec06e0e0b604/”, “destroyed_datetime”: null, “provider_options”: {}, “nodes”: [ “/api/infra/v1/node/5c4c78e0-71c9-4420-9a1d-fdb04a35d1de/” ], “deployed_datetime”: “Tue, 15 Mar 2016 17:18:17 +0000”, “nickname”: “couchbase-node”, “dockercloud_action_uri”: “”, “name”: “couchbase-node” } |
The dashboard at cloud.docker.com is updated to show: 
More information about each node can be seen as well: 
Create a new Docker Cloud Service
Create a Docker Cloud Service:
|
1 2 |
도커–클라우드 service 만들다 —tag 카우치베이스 –p 8091:8091 –p 8092:8092 –p 8093:8093 –p 11210:11210 arungupta/카우치베이스 936dbe58–7c7c–4289–837a–15d29128e5ea |
If multiple node clusters exists, then --tag is used to assign a service to a node cluster. docker-cli#10 is filed to ensure multiple ports can be exposed using -p 8091-8093:8091-8093 format. This will be aligned with the docker CLI.
Docker image used here is arungupta/couchbase. This image is based on the official 카우치베이스 image at Docker Hub 그리고 pre-configures it for different services.
Start the Docker Cloud Service:
|
1 2 |
도커–클라우드 service start 834343fd–b1d5–4d66–a2cd–69d27a471658 834343fd–b1d5–4d66–a2cd–69d27a471658 |
The updated dashboard looks like:
Get the Docker Cloud Service logs:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
도커–클라우드 service logs 834343fd–b1d5–4d66–a2cd–69d27a471658 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:04.826000846Z Starting 카우치베이스 서버 — Web UI available at https://:8091 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.832855273Z * Trying 127.0.0.1… 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.833816400Z % Total % Received % Xferd Average Speed Time Time Time Current 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.834647384Z Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 —:—:— —:—:— —:—:— 0* Connected -로 127.0.0.1 (127.0.0.1) port 8091 (#0) 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.835659864Z < POST /pools/기본값 HTTP/1.1 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.835705633Z < User–Agent: curl/7.40.0–DEV 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.835764766Z < Host: 127.0.0.1:8091 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.835808491Z < Accept: */* couchbase-d96eed5d-1 | 2016-03-14T22:54:19.835849972Z > Content-Length: 36 couchbase-d96eed5d-1 | 2016-03-14T22:54:19.835890805Z > Content-Type: application/x-www-form-urlencoded couchbase-d96eed5d-1 | 2016-03-14T22:54:19.835951739Z > couchbase-d96eed5d-1 | 2016-03-14T22:54:19.836153748Z } [36 bytes data] couchbase-d96eed5d-1 | 2016-03-14T22:54:19.836431490Z * upload completely sent off: 36 out of 36 bytes couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838702601Z < HTTP/1.1 200 OK couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838831946Z < Server: Couchbase Server couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838882039Z < Pragma: no-cache couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838929456Z < Date: Mon, 14 Mar 2016 22:54:19 GMT couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838944199Z < Content-Length: 0 couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838973658Z < Cache-Control: no-cache couchbase-d96eed5d-1 | 2016-03-14T22:54:19.838984780Z < 100 36 0 0 100 36 0 5643 –:–:– –:–:– –:–:– 6000 couchbase-d96eed5d-1 | 2016-03-14T22:54:19.839338450Z * Connection #0 to host 127.0.0.1 left intact couchbase-d96eed5d-1 | 2016-03-14T22:54:19.843462008Z * Trying 127.0.0.1… couchbase-d96eed5d-1 | 2016-03-14T22:54:19.844335715Z % Total % Received % Xferd Average Speed Time Time Time Current couchbase-d96eed5d-1 | 2016-03-14T22:54:19.845478686Z Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0) couchbase-d96eed5d-1 | 2016-03-14T22:54:19.845676061Z > POST /node/controller/setupServices HTTP/1.1 couchbase-d96eed5d-1 | 2016-03-14T22:54:19.845729619Z > User-Agent: curl/7.40.0-DEV couchbase-d96eed5d-1 | 2016-03-14T22:54:19.845805193Z > Host: 127.0.0.1:8091 couchbase-d96eed5d-1 | 2016-03-14T22:54:19.845858410Z > Accept: */* 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.845911479Z < Content–Length: 26 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.845986653Z < Content–Type: application/x–www–form–urlencoded 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.846040578Z < 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.846312512Z } [26 bytes 데이터] 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.846561659Z * upload completely sent off: 26 밖으로 of 26 bytes 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847024846Z < HTTP/1.1 200 OK 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847082032Z < 서버: 카우치베이스 서버 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847157246Z < Pragma: no–cache 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847211690Z < 날짜: Mon, 14 Mar 2016 22:54:19 GMT 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847266024Z < Content–Length: 0 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847344403Z < 캐시–Control: no–cache 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.847411160Z < 100 26 0 0 100 26 0 6056 —:—:— —:—:— —:—:— 8666 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.849284426Z * Connection #0 to host 127.0.0.1 left intact couchbase-d96eed5d-1 | 2016-03-14T22:54:19.853702443Z * Trying 127.0.0.1… couchbase-d96eed5d-1 | 2016-03-14T22:54:19.853890120Z % Total % Received % Xferd Average Speed Time Time Time Current couchbase-d96eed5d-1 | 2016-03-14T22:54:19.853943309Z Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 –:–:– –:–:– –:–:– 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0) couchbase-d96eed5d-1 | 2016-03-14T22:54:19.854112174Z > POST /settings/web HTTP/1.1 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854169870Z < User–Agent: curl/7.40.0–DEV 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854223412Z < Host: 127.0.0.1:8091 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854278756Z < Accept: */* 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854335649Z < Content–Length: 50 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854391073Z < Content–Type: application/x–www–form–urlencoded 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854447141Z < 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.854683623Z } [50 bytes 데이터] 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.855024680Z * upload completely sent off: 50 밖으로 of 50 bytes 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859378932Z < HTTP/1.1 200 OK 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859530830Z < 서버: 카우치베이스 서버 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859611527Z < Pragma: no–cache 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859794083Z < 날짜: Mon, 14 Mar 2016 22:54:19 GMT 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859848224Z < Content–Type: application/json 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859912932Z < Content–Length: 39 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859957829Z < 캐시–Control: no–cache 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859972017Z < 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.859986584Z { [39 bytes 데이터] 100 89 100 39 100 50 6060 7770 —:—:— —:—:— —:—:— 8333 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.860221103Z * Connection #0 to host 127.0.0.1 left intact 카우치베이스–d96eed5d–1 | 2016–03–14T22:54:19.860730000Z {“newBaseUri”:“https://127.0.0.1:8091/”}/entrypoint.sh 카우치베이스–server |
The log shows output from the Couchbase REST API invoked to configure the Couchbase server.
Access Couchbase Server in Docker Cloud
Inspect the Docker Cloud service for the exposed container ports:
0
To be more specific, exact URI for the 카우치베이스 웹 콘솔 can be obtained as:
1
Access the Couchbase Web Console at https://couchbase-b9132b42.936dbe58.svc.dockerapp.io:8091/ to see the Couchbase Web Console login screen. Enter the password credentials of 관리자 그리고 password. 
And the 카우치베이스 웹 콘솔 looks like:
Terminate the Docker Cloud Service and Node
Check the list of Docker Cloud services running:
2
Terminate the service:
3
Check the list of nodes:
4
Terminate the node as:
5
Docker Cloud References
- Getting Started with Docker Cloud
- Docker Cloud Tutorials
- Docker Cloud API
- Questions on Docker Forums
In this blog, you learned:
- Key concepts of Docker Cloud
- How to create a new Docker Cloud Node
- How to install Docker Cloud CLI
- How to create a new Docker Cloud Service
- Access Couchbase Server in Docker Cloud
- How to terminate the Docker Cloud Service and Node
Enjoy! Source: https://www.couchbase.com/blog/getting-started-docker-cloud/



댓글 남기기
댓글을 달기 위해서는 로그인해야합니다.