mirror of
https://github.com/wsargent/docker-cheat-sheet.git
synced 2025-09-22 05:40:50 +02:00
Make order reflect table of contents.
This commit is contained in:
parent
43291a45a1
commit
22608672ce
1 changed files with 25 additions and 25 deletions
50
README.md
50
README.md
|
@ -197,31 +197,6 @@ In order to push to this repository tag image with `repositoryHostName:5000/imag
|
|||
|
||||
* [Flux7's Dockerfile Tutorial](http://flux7.com/blogs/docker/docker-tutorial-series-part-3-automation-is-the-word-using-dockerfile/)
|
||||
|
||||
### Examples
|
||||
|
||||
* [Examples](https://docs.docker.com/reference/builder/#dockerfile-examples)
|
||||
* [Best practices for writing Dockerfiles](https://docs.docker.com/articles/dockerfile_best-practices/)
|
||||
* [Michael Crosby](http://crosbymichael.com/) has some more [Dockerfiles best practices](http://crosbymichael.com/dockerfile-best-practices.html) / [take 2](http://crosbymichael.com/dockerfile-best-practices-take-2.html).
|
||||
|
||||
## Best Practices
|
||||
|
||||
This is where general Docker best practices and war stories go:
|
||||
|
||||
* [The Rabbit Hole of Using Docker in Automated Tests](http://gregoryszorc.com/blog/2014/10/16/the-rabbit-hole-of-using-docker-in-automated-tests/)
|
||||
* [Bridget Kromhout](https://twitter.com/bridgetkromhout) has a useful blog post on [running Docker in production](http://sysadvent.blogspot.co.uk/2014/12/day-1-docker-in-production-reality-not.html) at Dramafever.
|
||||
* There's also a best practices [blog post](http://developers.lyst.com/devops/2014/12/08/docker/) from Lyst.
|
||||
* [A Docker Dev Environment in 24 Hours!](http://blog.relateiq.com/a-docker-dev-environment-in-24-hours-part-2-of-2/)
|
||||
* [Building a Development Environment With Docker](http://tersesystems.com/2013/11/20/building-a-development-environment-with-docker/)
|
||||
* [Discourse in a Docker Container](http://samsaffron.com/archive/2013/11/07/discourse-in-a-docker-container)
|
||||
|
||||
## Security
|
||||
|
||||
If you are in the `docker` group, you effectively [have root access](http://reventlov.com/advisories/using-the-docker-command-to-root-the-host).
|
||||
|
||||
Likewise, if you expose the docker unix socket to a container, you are giving the container [root access to the host](https://www.lvh.io/posts/dont-expose-the-docker-socket-not-even-to-a-container.html).
|
||||
|
||||
Docker image ids are [sensitive information](https://medium.com/@quayio/your-docker-image-ids-are-secrets-and-its-time-you-treated-them-that-way-f55e9f14c1a4) and should not be exposed to the outside world. Treat them like passwords.
|
||||
|
||||
## Layers
|
||||
|
||||
The versioned filesystem in Docker is based on layers. They're like [git commits or changesets for filesystems](https://docs.docker.com/terms/layer/).
|
||||
|
@ -320,6 +295,31 @@ If you forget what you mapped the port to on the host container, use `docker por
|
|||
docker port CONTAINER $CONTAINERPORT
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
* [Examples](https://docs.docker.com/reference/builder/#dockerfile-examples)
|
||||
* [Best practices for writing Dockerfiles](https://docs.docker.com/articles/dockerfile_best-practices/)
|
||||
* [Michael Crosby](http://crosbymichael.com/) has some more [Dockerfiles best practices](http://crosbymichael.com/dockerfile-best-practices.html) / [take 2](http://crosbymichael.com/dockerfile-best-practices-take-2.html).
|
||||
|
||||
## Best Practices
|
||||
|
||||
This is where general Docker best practices and war stories go:
|
||||
|
||||
* [The Rabbit Hole of Using Docker in Automated Tests](http://gregoryszorc.com/blog/2014/10/16/the-rabbit-hole-of-using-docker-in-automated-tests/)
|
||||
* [Bridget Kromhout](https://twitter.com/bridgetkromhout) has a useful blog post on [running Docker in production](http://sysadvent.blogspot.co.uk/2014/12/day-1-docker-in-production-reality-not.html) at Dramafever.
|
||||
* There's also a best practices [blog post](http://developers.lyst.com/devops/2014/12/08/docker/) from Lyst.
|
||||
* [A Docker Dev Environment in 24 Hours!](http://blog.relateiq.com/a-docker-dev-environment-in-24-hours-part-2-of-2/)
|
||||
* [Building a Development Environment With Docker](http://tersesystems.com/2013/11/20/building-a-development-environment-with-docker/)
|
||||
* [Discourse in a Docker Container](http://samsaffron.com/archive/2013/11/07/discourse-in-a-docker-container)
|
||||
|
||||
## Security
|
||||
|
||||
If you are in the `docker` group, you effectively [have root access](http://reventlov.com/advisories/using-the-docker-command-to-root-the-host).
|
||||
|
||||
Likewise, if you expose the docker unix socket to a container, you are giving the container [root access to the host](https://www.lvh.io/posts/dont-expose-the-docker-socket-not-even-to-a-container.html).
|
||||
|
||||
Docker image ids are [sensitive information](https://medium.com/@quayio/your-docker-image-ids-are-secrets-and-its-time-you-treated-them-that-way-f55e9f14c1a4) and should not be exposed to the outside world. Treat them like passwords.
|
||||
|
||||
## Tips
|
||||
|
||||
Sources:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue