Public Repository

Last pushed: 4 months ago
Short Description
Testbox for
Full Description

# Configure Docker to start on boot
sudo systemctl enable docker

# show all containers on the system
docker ps -a

docker images

Docker help

Container vs image. Container is a running image.

Create your own image

touch Dockerfile
FROM docker/ubuntu:latest
RUN apt-get -y update && apt-get install -y redis-server
CMD echo "asd"

Then Dockerfile is used to build an image:

docker build -t . is a name. . is a directory (current dir) with a Dockerfile.

After build finishes you can see your image in docker images.

REPOSITORY              TAG                 IMAGE ID            latest              7a09c1c661c4

Tag image before pushing:

docker tag 7a09c1c661c4 <yourlogin>/

Last thing to do is to login to docker hub and push an image there.

docker login

docker push pashinin/

Your authentication credentials will be stored in the .dockercfg authentication file in your home directory.


For managing multiple containers.


curl -L "$(uname -s)-$(uname -m)" > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

docker-compose --version
# docker-compose version: 1.8.1

Create docker-compose.yml:

Docker Pull Command