What happens when you put your app in a Docker container
docker run: what a container really is on the server
Everyone calls it a container. The name makes it sound like a small computer hidden inside a server. Type docker run, then look at what really starts.
-
1
Your image waits on the server. Before Miva taps anything, it has to start. Watch closely: what starts may surprise you.
-
2
You type
docker runon the server, and your app starts from the image, with everything it needs inside. Each running copy of an image is called a container. -
3
The name makes it sound like a little computer hidden inside the server. But a computer takes time to start, and this one was running the moment you asked.
-
4
So what is it, really? The server keeps a list of every program it runs, called its processes. Your app, in its container, is simply one more process on that list, next to the server's own.
-
5
Show time, and Miva opens the request page with a song in mind. Your container runs on the server, yet her phone can't reach it. Why?
-
Quick check
While Miva waits, you try once more.
Show the answer
Two. Each container here is one process, and both come from the same image.
-
Go further
More words for the programs on the server's list.