Installing Docker¶
- Docker Community Edition (CE) is common for single-users
Use the below methods then test to see if the install worked using:
$ docker run hello-world
Docker Install (Mac)¶
- Docker will need its own virtual machine to run on a Mac or windows
- This is unlike linux which can just use the host machine
- Go to docker’s site and download the Docker Toolbox for MacOS
- Install package
- Spotlight and run “Docker Quickstart Terminal”
- This will setup the docker server
- Run the command:
$ eval "$(docker-machine env default)"
5. We can now run docker-compose to show a number of command which can be used to manage the docker server
Docker Install (Ubuntu)¶
- Follow the instructions https://docs.docker.com/install/linux/docker-ce/ubuntu/
- These frequently change
- Set up the repository
$ sudo apt-get update
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo apt-key fingerprint 0EBFCD88
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
$ sudo apt-get update
$ sudo apt-get install docker-ce