2018年2月21日星期三

My very first container on Docker ... (2018)

I have heard "Container", "Docker" in all year long, but I haven't quite figured it out what they really are!
Then I realized the best way to understand it is to practice, solving all sort of problems during implementation will help you understand the "new" techniques, "new" products, at least to myself!

Nothing fancy in this blog. It just a log what I have progressed so far.

1. Install a CentOS 7 on a VM esxi v5.0 (I knew, it is very old exsi version. But that is what I can get).

2. Install docker by following Get Docker CE for CentOS.
I just followed the steps and I was able to install docker CE without problems.

3. Follow Post-installation steps for Linux to continue.
is the chapter I encountered issues. Once I configured the docker daemon to listen to ports, docker couldn't start.
I tried to Google the solution, but couldn't find useful information.
I decided to skip this and continue.

4. Start reading . Why not, I am a rookie in Docker/Container.

5. Build my very first container by following .
It started to work after I stopped/disabled firewalld and stop iptables.
And here I am:


6. Tag and push the newly built image to repository.
But error occurred and it complained about the iptables.
Google the error but the solution is not quite what I looking for.
I stop the docker and start again.
Build the image, tagged it, pushed it again.
Now I can run the image from repository! Problem solved!

7. Follow to start load-balanced services.

8. Install a few tools on CentOS7:
* wget
* virtualbox
* docker-machine

That is great. At least I think I know what container really is and what Docker is!

Continue:

9. Follow to create swarm cluster.

I am having trouble to create vm on my esxi. I am trying to find a fix for the issue.