HanG321 Blog

getting started with Docker on Mint 17

## installation
sudo apt-get install apparmor lxc cgroup-lite
sudo apt-get install docker.io

## verification
sudo service docker.io start
sudo docker run hello-world

## show current images
sudo docker images

## view location
sudo cat /var/lib/docker/repositories-aufs | python -m json.tool

## change docker image installation directory
sudo docker ps -q | xargs docker kill
sudo service docker.io stop
mkdir /your/path/to/docker && chmod 700 /your/path/to/docker
sudo vim /etc/default/docker.io
# add new line
   DOCKER_OPTS="-g /your/path/to/docker"

## as root: su
chown root.root /your/path/to/docker
mv /var/lib/docker/* /your/path/to/docker/
echo "image location moved, see /etc/default/docker.io for new location" > /var/lib/docker/README

## as normal user
sudo service docker.io start
sudo docker images
## hellow-world listed

 

Exit mobile version