Docker issues

For security reasons Docker in Linux in Laboratories cannot be used directly in operating system. After running Docker following message will appear:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.35/volumes: dial unix /var/run/docker.sock: connect: permission denied

You can use Docker with the help od docker-machine tool - it creates virtual machine in which the Docker commands are run. Firstly you should create the machine with command:

docker-machine create machinename

Then prepare the environment in terminal which will be used to start Docker commands:

eval $(docker-machine env machinename)

To check IP address of the machine in which Docker is running, use the command:

docker-machine ip machinename

Machines are created on local disk (in /media/poligon/docker_username), they are not moved between computers and are deleted from disk after 7 days. You will need to use commands above again after logging to another computer.