Docker Cloud is a hosted service for Docker container. With Docker Cloud, it is possible to do management, orchestration, and deployment of the container in some Cloud Providers. These types of products are classified with as CAAS, Container-as-a-Service. It was acquired by Docker
Some features available in the Docker Cloud include:
- Provision Docker installed infrastructure
- Manage node clusters
- Pull images from Docker Hub
- Deploy containers across nodes
- Monitor and scale applications
- Continuos Integration
- Continuos Delivery
- Client: HTTP, Command Line Interface, Go, Python, UI DashBoard
It is possible to create, deploy, and manage applications as well as start, restart, and destroy containers. These services are free for just one private repository and one parallel build. The cloud providers available are Amazon Web Service, Digital Ocean, Microsoft Azure, SoftLayer, and Packet.
To use Docker Cloud for the first time is very easy. There is a that shows step-by-step what it should do like and how to link a cloud provider, deploy a node, create a service, create a stack, and use the image repository from Docker Hub. All these steps are itemized with a hint on each label.
How Does It Work?
In my test, I used the cloud provider AWS:
Under Create a stack, I picked up one option offered by Stackfiles with Redis.
When I clicked "create," the Stack that I chose appeared, listing the container that would be deployed.
The next step was creating the Node Cluster. This node cluster is one EC2 in AWS. In this, EC2 will be installed by a Docker machine, and in this Docker machine, the containers will be deployed.
At the end of this step, this Node Cluster will be shown with State running in Docker Cloud Node panel and Running in AWS Console.
Be careful because the Security Group is blank by default. This means that the TCP connection is inbound and opened in all ports.
Now it is possible to start the container available the Stack Panel.
If you click in the container with web, it is possible to click to see the application web running.
Another option to deploy or manage containers is by command line interface, which can be done in these steps:
Install Docker-cloud (Mac OS: brew install docker-cloud; Unix: pip install docker-cloud).
Docker login > Docker Hub account.
Mkdir devops-cafe > create dir to DockerFile and code.
Main.go > code that produces hello world in for 80.
5. Create DockerFile.
6. Create Docker Compose.
7. Docker build: -t devops-cafe.
8. Docker tag: devops-cafe rafaelsalerno/devops-cafe.
9. Docker push: rafaelsalerno/devops-cafe.
10. Docker-cloud service: run -p --name web rafaelsalerno/devops-cafe (after this command, the container should be running).
11. Docker-cloud container ps --no-trunc --service web (check that the containers are running).
12. Docker-cloud service scale web 2; deploy two more containers with the same application.
In just this brief contact with the Docker Cloud, I could see that this tool can make life easier when we want work with Docker integrated with AWS. The command line is powerful and the Dashboard is simple and objective to work.