Skip to content

Instantly share code, notes, and snippets.

@zcaceres
Created July 7, 2017 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zcaceres/c9bacbf2caa5f69cf1a2231701ebc320 to your computer and use it in GitHub Desktop.
Save zcaceres/c9bacbf2caa5f69cf1a2231701ebc320 to your computer and use it in GitHub Desktop.
Notes on Docker

Docker

Containers

Linux containers created isolated environments that share a single operating system.

Containers live on top of an OS with its own dependencies and other configurations/ They don't know about each other. They have their own file systems.

Docker makes it easy to deal with Linux containers.

The Docker engine manages your containers.

  • Docker can create a contained controlled dev environment
  • Testing/Deployment
  • Sharing identical environment across a team

Images

Prepackaged sets of instructions, like blueprints, used to create a container.

You can save an image and share it with other devs or use it re-create the exact environment.

Check out the Docker store for pre-made images to use.

Dockerfile

Text file that with instructions that you can run with a single command. It gives you back an image that can be used to make a container.

Always Dockerfile (capital D).

Data Volumes

Containers will not persist data. You can include some files when the environment launches by including them in the image.

But they will be gone when the container is shut down and any modifications will be lost. Data can be exposed from your local machine by using a DATA VOLUME.

Great for local development!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment