I was having really hard time to make gitlab runner work on new redhat server’s docker replacement – podman. Here are few tips for future record How to make it work Create all necessary folders run container in privileged mode so that mount won’t report error such as mount: permission denied (are you root?) also need to use z after mouting point to surpress SELinux mount all necessary folder and share them for gitlab-runner to call use DOCKER_HOST=unix:///var/run/docker.

Continue reading

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: version: "2" services: db: environment: - MYSQL_DATABASE=wordpressdb - MYSQL_PASSWORD=#### - MYSQL_ROOT_PASSWORD=#### - MYSQL_USER=admin image: 'mariadb:latest' container_name: wordpress_db ports: - '3306:3306' volumes: - '/var/www/db:/var/www/db' web: ports: - '80:80' image: 'wordpress:latest' container_name: wordpress_web links: - db volumes: - '/var/www/html:/var/www/html'

Continue reading

Author's picture


Love coding and new technologies

Cloud Solution Consultant