-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Docker explanation #691
Conversation
wturrell
commented
Oct 9, 2016
- More of an overview / how it works
- Explain in which circumstances it might be useful
- Simplify the example container
- Mention PHPDocker.io
- Two links to Docker Hub, one with the official images
- brief security warning
- More of an overview / how it works - Explain in which circumstances it might be useful - Simplify the example container - Mention PHPDocker.io - Two links to Docker Hub, one with the official images - brief security warning
[docker-hub] to search a list of available pre-built containers, which you can then run and use in very few steps. | ||
[Docker] is so called because it's all about containers. It's a lightweight alternative to a fully-fledged Vagrant VM. PHP's OOP is perhaps a helpful analogy to understanding it: think of Docker "images" as classes and "containers" as instances of them. For a typical LAMP application, you might have a web server container, another for the PHP-FPM process and a third for the MySQL server. Your project files - PHP, HTML, other assets, database contents – all remain on your host computer. You can create containers from the command line, or build a `docker-compose.yml` file that specifies which to use and how they communicate ("link") with one another. | ||
|
||
Docker may help if you're developing multiple websites and want the separation that comes from installing each on it's on virtual machine, but don't have the necessary disk space or the time to keep everything up to date. It's efficient: the installation and downloads are quicker, you only need to store one copy of each image however often it's used, containers need less RAM and share the same OS kernel, so you can have more servers running simultaneously, and it takes a matter of seconds to stop and start them, no need to wait for a full server boot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from installing each on it's on virtual machine
it's on
should be its own
more things that you can do with Docker. One of the most important things for PHP developers will be linking your | ||
web server to a database instance, for example. How this could be done is well described within the [Docker User Guide] | ||
[docker-doc]. | ||
The command above shows a quick way to run a basic server. There's much more you can do (and thousands of pre-built images in the [Docker Hub][docker-hub].) Take time to learn the terminology and read the [Docker User Guide][docker-doc] to get the most from it, and don't run random code you've downloaded without checking it's safe – unofficial images may not have the latest security patches. If in doubt, stick to the [official repositiories][docker-hub-official]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's much more you can do (and thousands of pre-built images in the [Docker Hub][docker-hub].)
This may sound really picky, but the closing .
at the end of the sentence should be outside the parentheses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks.
There are many helpful docker images which could provide you with other great services without the need to install | ||
these services on your local machine, e.g. MySQL or PostgreSQL and a lot more. Have a look at the [Docker Hub Registry] | ||
[docker-hub] to search a list of available pre-built containers, which you can then run and use in very few steps. | ||
[Docker] is so called because it's all about containers. It's a lightweight alternative to a fully-fledged Vagrant VM. PHP's OOP is perhaps a helpful analogy to understanding it: think of Docker "images" as classes and "containers" as instances of them. For a typical LAMP application, you might have a web server container, another for the PHP-FPM process and a third for the MySQL server. Your project files - PHP, HTML, other assets, database contents – all remain on your host computer. You can create containers from the command line, or build a `docker-compose.yml` file that specifies which to use and how they communicate ("link") with one another. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oxford comma!
think of Docker "images" as classes, and "containers"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think this paragraph is rather complex. I can have a go at shuffling it around when im not super jetlagged, but I do like where you are heading.
I may have made it more complicated than before… Might be case of deciding what to leave out (e.g. I've tried to explain distinction between images and containers and give a simple example where containers only do one thing – I was thoroughly confused when first searching the Docker Hub…)