A quick crash course on how to get a docker container up and going on a Ubuntu 16.04 server.
01. This first section will essentially install the docker repos onto the Ubuntu box.
sudo su -
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-cache policy docker-ce
02. This will actually install docker.
apt-get install -y docker-ce
03. Check that its running.
04. This will test that docker is properly installed and able to execute docker containers.
05. This will download the ubuntu image from the repo.
06. The will need to list the images which are available to us, taking note of the image ID
07. Then we cut-n-paste the ID into the command below.
docker run -i -t ad892dd21d60 /bin/bash
08. You will now notice your running a full blown Ubuntu OS which is actually in a container, this is tested by checking what procs are running by typing “ps waux”, there should only be a few procs running.
09. Exit out of the container, this will end the container
10. The following command will show you the available containers
11. Determine which container you worked on, cut and paste the ID into the command below to start it in the background.
12. The container is now running, can may connect to it on the terminal by typing the following command and pasting the ID at the end.
All you need to know to get you going!