- Docker Installation
- Docker Notable commands
- Creating docker image
- Example: Creating django image to run django app
- Docker Compose quickstart
- [Persisting data in docker container]
- [Networking in docker]
- [Services in docker]
- [Docker and continious integration]
- [Automation with docker and ansible]
Docker Installation
https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
Docker commands
>> docker info # To get the docker version, list total images as well.
>> docker version
>> docker image # List the locally available images
>> docker container ls # List the running containers
>> docker ps # List running containers
>> docker ps -a # List running and stopped containers
>> docker pull hello-world # Pull docker image from docker hub
>> docker login # Login to docker hub
>> docker run -it python:latest bash # Pull python latest image from docker hub, if not locally available, and run the bash shell interactively.
>> docker run web -d --name mycontainer # Run web container in background
>> docker run web ls -l # Run web container and print the output of ls -l command
>> docker port mycontainer # List the listening port of mycontainer
# Run the djangoweb container from django image and pass environment varables as well and
# Mapp all the exposed port to host.
>> docker run --name djangoweb -e DJANGO_SETTINGS_MODULE="settings.production" -d -P django