Getting Started
Docker Community Edition (CE) (Docker CE) is the version we are using.
Install
How To Install and Use Docker on Ubuntu 20.04 https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
apt install docker-ce
Legacy
Tip
If you are using the Docker files created by Django CookieCutter, then the version from the Ubuntu repositories is not new enough, so it is better to follow the official instructions to install Docker: https://docs.docker.com/engine/installation/linux/ubuntu/
Note
docker-compose
is installed using pip
!
Add docker-compose
to requirements/local.txt
.
Ubuntu 16.10
Note
See tip
above…
sudo apt install docker.io
Ubuntu 16.04
Important
Make sure you have Ubuntu 14.04 (64 bit)
Important
Install Docker on a 64 bit operating system.
Remove old versions:
sudo apt-get remove docker docker-engine
Verify that you have wget installed:
which wget
Install Docker:
wget -qO- https://get.docker.com/ | sh
Configure
If you would like to use Docker as a non-root user, you should now consider
adding your user to the docker
group with something like:
sudo usermod -aG docker patrick
Note
Log out and back in again.
Verify docker is installed correctly:
docker run hello-world
Docker uses a bridge to manage containers networking, by default UFW drops all forwarding, a first step is to enable forwarding:
sudo vim /etc/default/ufw
# Change:
# DEFAULT_FORWARD_POLICY="DROP"
# to
DEFAULT_FORWARD_POLICY="ACCEPT"
Then reload UFW:
sudo ufw reload
Install Docker Compose:
sudo -i
curl -L https://github.com/docker/compose/releases/download/1.3.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Note
This looks like a very useful starting point: https://docs.docker.com/compose/django/