Via aliases file.
docker exec -it [container-id] bash
docker attach [container-id]
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -q)
docker rmi -f $(docker images --filter "dangling=true" -q)
# Check Kernel Version #
$ uname -r
# Prerequisites #
$ sudo apt-get install apt-transport-https ca-certificates
# Install/Enable aufs support #
$ sudo apt-get install linux-image-extra-`uname -r`
# Add GPG Key #
$ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# Add Docker Repo to Ubuntu 12.04, 14.04 & 15.10 Systems #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-'$(lsb_release -cs)' main' >> /etc/apt/sources.list.d/docker.list"
# Add Docker Repo to Debian Systems 7 & 8 #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo debian-'$(lsb_release -cs)' main' >> /etc/apt/sources.list.d/docker.list"
# Add Docker Repo to Mint 17.1, 17.2 & 17.3 Systems #
$ sudo sh -c "echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' >> /etc/apt/sources.list.d/docker.list"
# Update system index #
$ sudo apt-get update && sudo apt-get upgrade
# Install Docker #
$ sudo apt-get install docker-engine
# Start Docker daemon #
$ sudo service docker start # For SysVinit Systems #
$ sudo systemctl start docker # For systemd Systems #
# Verify Docker #
$ sudo docker run hello-world
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
docker run --volume $SSH_AUTH_SOCK:/ssh-agent --env SSH_AUTH_SOCK=/ssh-agent ubuntu ssh-add -l