Docker - howto

From Skytech
Jump to navigation Jump to search

Some notes on install/usage

sudo aptitude install linux-image-extra-`uname -r`
sudo sh -c "wget -qO- | apt-key add -"

sudo sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"

sudo aptitude    update
sudo aptitude install lxc-docker

sudo vim /etc/default/ufw
sudo ufw reload

## On linux mint, install apparmor or docker will not start
sudo aptitude install apparmor

## Add user to docker group to avoid using sudo
sudo gpasswd -a martin docker

## Login to a running docker (bash)
docker exec -it <CONTAINER_ID> bash


Followed some of the stuff from this howto:


More info:

Various tips

Change default storage location

Change default storage location of docker image files:

# Edit /etc/default/docker and add -g like:
DOCKER_OPTS="--dns --dns -g /mnt/docker-images"

Restart docker

Dirty quickie to install latest docker

This involves trusting/running a script from an unknown origin!

apt-get update; apt-get install -y curl; curl -sSL | sh