Docker Hint

Few usefull cmd for easier docker managment: To delete all errored out container: docker rm $(docker ps -q -f status=exited). To force container keep running without exit: tail -f /dev/null. Sometime you may have error X509: certificate signed by unknown authority docker error with wellknown CA signed certs, add cert locally to get rid of it: $ sudo mv /usr/local/share/ca-certificates # update global certificates definitions $ sudo update-ca-certificates # restart affected services $ sudo systemctl daemon-reload $ sudo systemctl restart docker Use docker save -o <path for generated tar file> <image name> to save local docker image and scp to other host, then docker load -i <path to image tar file> to load docker image with an old tag.

Continue reading

A quick snippet for ubuntu 16.04 to install docker-ce sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] \ $(lsb_release -cs)\ stable" sudo apt-get update sudo apt-get install -y --allow-unauthenticated docker-ce sudo usermod -aG docker ubuntu

Continue reading

You can build a private docker cloud by using docker-machine with openstack. Install docker-machine. $ base= && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine Source Docker-machine create new docker installed instance. docker-machine create -d openstack –openstack-net-id 5ce399f3-fd56-42eb-8ca0-7e0f4a109e51 –openstack-flavor-name m1-small –openstack-image-id d4a5378f-73f2-44ec-b8b8-498d299a6c55 –openstack-domain-name┬ádefault –openstack-ssh-user ubuntu docker 4. Docker-compose to run docker ymal ```shell curl -L$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose Dockerfile:

Continue reading

Author's picture


Love coding and new technologies

Cloud Solution Consultant