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 registry.example.com.crt /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 https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(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=https://github.com/docker/machine/releases/download/v0.16.0 && curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine && sudo install /tmp/docker-machine /usr/local/bin/docker-machine Source openstack-rc.sh 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 https://github.com/docker/compose/releases/download/1.14.0/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose Dockerfile:

Continue reading

Author's picture

LuLU

Love coding and new technologies

Cloud Solution Consultant

Canada