Last active
September 29, 2019 08:43
-
-
Save cztomczak/d554f14d90f9b6812a7f5fe669f94175 to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get install docker-engine | |
# Set permissions. Restart is required. | |
sudo usermod -aG docker $USER | |
# Docker version/info | |
docker -v | |
docker info | |
# Hello world | |
docker run hello-world | |
# Extract hello-world image contents to a directory | |
docker save hello-world > hello-world.tar | |
mkdir hello-world | |
tar -xvf hello-world.tar -C hello-world | |
# List Docker images | |
docker image ls | |
# List Docker containers (running, all, all in quiet mode) | |
docker container ls | |
docker container ls --all | |
# Build and run | |
docker build --tag=alpine . | |
docker run -it --rm alpine | |
# Images | |
docker images -a | |
docker images -f dangling=true | |
# Containers | |
docker ps -a | |
docker ps -a -f status=exited | |
# Volumes | |
docker volume ls | |
docker volume ls -f dangling=true | |
# Prune everything | |
docker system prune | |
docker system prune -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment