码迷,mamicode.com
首页 > 其他好文 > 详细

Learn Docker

时间:2016-10-14 00:26:21      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:

Learn Docker

A Container is to VM today, what VM was to Physical Servers a while ago. The workload seems to shifting towards containers, and fast! In case you haven’t started ramping on it yet, you may find it a bit overwhelming to begin with.

I thought of sharing some byte sized information about Docker every day so that you can come onboard quickly. Stay tuned and subscribe to this blog so that you don’t miss the upcoming posts. Also, feel free to comment, share your experiences and questions. I will try my best to address them as appropriate.

Continue reading “Learn Docker #1 – Introduction”


Learn Docker #2 – What is Docker?

This entry is part 2 of 9 in the series Docker

Containers provide you an isolated view of the file system and you can play around with your view of the container. Other containers on the same server won’t get affected at all. This helps the developers a lot, since in today’s open source world, the developers tend to work with different versions of different libraries and frameworks.

This also makes your deployment a breeze, since all you need to do now is to ensure that your software works in your container properly. If it works locally, it simply continues to work on any other Linux box, and this is a big, Big, BIG relief! “Works on my box” syndrome, is no longer true with a container backing you 技术分享

Continue reading “Learn Docker #2 – What is Docker?”


Learn Docker #3 – Set it up

This entry is part 3 of 9 in the series Docker

You can install Docker on Mac, WindowsUbuntuCentOS, and  other supported platforms by following the respective installation guides. As mentioned earlier, because the Docker daemon uses Linux-specific kernel features, you can’t run Docker natively in Windows or OS X. Instead, you must use docker-machine to create and attach to a virtual machine (VM). This machine is a Linux VM that hosts Docker for you on your Mac or Windows.

For a Docker installation on Linux, your physical machine is both the localhost and the Docker host. In networking, localhost means your computer. The Docker host is the computer on which the containers run.

Continue reading “Learn Docker #3 – Set it up”


Learn Docker #4 – Playing around

This entry is part 4 of 9 in the series Docker

Let’s play around with Docker a bit.

Display Docker Information

Docker information command is useful and you should use it while discussing your issues with someone or may be asking questions on StackOverflow and the likes.

Continue reading “Learn Docker #4 – Playing around”


Learn Docker #5 – What exactly does the Docker Toolbox contain?

This entry is part 5 of 9 in the series Docker

So far, we have been playing around with Docker and learnt some random but important commands. Let’s dive a bit deeper and learn some basic concepts and start from what you have already installed… The Docker Toolbox! The toolbox contains the following.

VirtualBox

The Virtual Box is used to host your Linux VM. The default VM is created automatically for you, and the Docker daemon is initialised and set up inside the VM. Your Host client talks to the daemon on the VM and returns the output to your terminal or client.

Continue reading “Learn Docker #5 – What exactly does the Docker Toolbox contain?”


Learn Docker #6 – Docker Engine, Images & Hub

This entry is part 6 of 9 in the series Docker

Docker Engine

Hosted at github, the Docker engine is the core of all this goodness! The Docker engine (or daemon) is standardised so that it looks exactly the same regardless of which host you are running it at. This means that if your code is working well on your Docker Engine, it will continue to work across the board as far as the Docker Engine is same! That’s actually fantastic if you think about it closely.

Continue reading “Learn Docker #6 – Docker Engine, Images & Hub”


Learn Docker #7 – Docker Container (start, stop, attach, detach & restart)

This entry is part 7 of 9 in the series Docker

Things to keep in mind about Containers

  • You don’t boot a container. You start it.
  • The containers run on a Docker host, which in turn runs on Linux.
  • Docker containers are running instances of an Image as you learnt in the previous post.
  • Learn $docker run command well, in order to work with containers.
  • By default, once the command is executed the containers exit.

Continue reading “Learn Docker #7 – Docker Container (start, stop, attach, detach & restart)”


Learn Docker #8 – Dockerfile

This entry is part 8 of 9 in the series Docker

What is Dockerfile?

You should be pretty comfortable using a Docker Image and creating Containers from it by now. But what if you want to create a custom image explicitly for your requirements?

Answer : Dockerfile!

And remember… Dockerfile != dockerfile != DockerFile. You get the idea.

Continue reading “Learn Docker #8 – Dockerfile”


Learn Docker #9 – Dockerfile (continued)

This entry is part 9 of 9 in the series Docker

Tagging an Image

In the previous post, you created an image. As discussed, you can view all images using…

$ docker images

REPOSITORY               TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
imrahulsoni/nginx-base   latest              6507bc42ad5a        20 hours ago        155.7 MB

Notice the Tag. An easy way to do this, is to use the following command… notice that the build command now has a :0.1 attached to it as the tag.

Continue reading “Learn Docker #9 – Dockerfile (continued)”

Learn Docker

标签:

原文地址:http://www.cnblogs.com/Leo_wl/p/5958612.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!