Docker 1.2 - Words Mean Things
Images - The blueprints, make up the basis of containers. [docker pull to get Busybox]
Containers - Made from images to run the application [docker run of Busybox image]
Daemon - Background service managing running, building, distributing docker containers
Client - The Command Line that talks to the daemon, though it can be a GUI. I prefer cmd line.
Hub - Registry - Directory - of images.
2.0 - How to Run A Static Website
- Pull image from Hub
- Run Container
- See how to run a webserver
Well, mission (sort of) accomplished!
Use a site already hosted on a registry for this demon.
Locally, it’s not here. So we have to get it from the registry and run it.
Nginx is running… - That’s good!
But there are more commands we have to put in - and as you can see, my prompt (Morganwarss-MacBook-Air:~ morganwars$) is gone.
Yet, somehow…
It works? And my Wifi is off, so it really is using a local port.
Well, let’s make our own Image. Remember how we did it with Busybox?
We can pull specific versions of images, if you don’t provide specifics, Docker will get the latest version - and you may not want that.
And images go even further than that!
Base Image - No parent images, usually with an OS.
Child Images - Build upon base images, add additional functionality.
Official images - Supported by the people at Docker, usually one word (or phrase) long.
User images - Made by us! Formatted by user/image-name
I’m still iffy on how to move about containers.
Anyway, we clone the prakhar1989/docker-curriculum repository and change directory to one about a flask-app. This application is written in Python.
the onbuild version of things does the boring stuff to get an app running.
And the python:3-onbuild app isn’t found, so I think we’re going back to the drawing board with this demo.
Comments
Post a Comment