Health Check command for docker(1.12) container (Not in Dockerfile!)

Docker Version 1.12, I got a Dockerfile from Here FROM nginx:latest RUN touch /marker ADD ./check_running.sh /check_running.sh RUN chmod +x /check_running.sh HEALTHCHECK –interval=5s –timeout=3s CMD ./check_running.sh I’m able to roll the updates and health checks with check_running.sh shell script. Here, the check_running.sh script is copied to image, so the launched container has it. Now, my […]

Docker mongodb config file

There is a way to link /data/db directory of the container to your localhost. But I can not find anything about configuration. How to link /etc/mongo.conf to anything from my local file system. Or maybe some other approach is used. Please share your experience.

Starting Jenkins in Docker Container

I want to run Jenkins in a Docker Container on Centos7. I saw the official documentation of Jenkins: First, pull the official jenkins image from Docker repository. docker pull jenkins Next, run a container using this image and map data directory from the container to the host; e.g in the example below /var/jenkins_home from the […]

Php7 Redis Client on Alpine OS

I crafted a docker image using alpine 3.5 as base Image. I want my php apllication running inside container to communicate with a redis server.But I don’t find any php7-redis client in Alpine. Is there a workway around it ?I tried to use pecl to install redis but there is no pecl package in alpine.I […]

Error: docker-engine-selinux conflicts with 2:container-selinux?

Centos 7. During installing Docker it says error: ~ wget -qO- https://get.docker.com/ | sh + sh -c ‘sleep 3; yum -y -q install docker-engine’ Error: docker-engine-selinux conflicts with 2:container-selinux-1.10.3-59.el7.centos.x86_64 You could try using –skip-broken to work around the problem ** Found 13 pre-existing rpmdb problem(s), ‘yum check’ output follows: audit-libs-2.6.5-3.el7.x86_64 is a duplicate with audit-libs-2.4.1-5.el7.x86_64 […]

Is it possible to deploy a docker hub publicly hosted image to Kubernetes Container Engine without uploading it to Containers Registery?

Still new to Containers and Kubernetes here but I am dabbling with deploying a cluster on Google Containers Engine and was wondering if you can use a docker hub hosted image to deploy containers, so in my .yaml configuration file I’d say: … image: hub.docker.com/r/my-team/my-image:latest … Is this possible? Or one has to download/build image […]

Postgres shuts down immediately when started with docker-compose

Postgres shuts down immediately when started with docker-compose. The yaml file used is below version: ‘2’ services: postgres: image: postgres:9.5 container_name: local-postgres9.5 ports: – “5432:5432” The log when docker-compose up command is executed Creating local-postgres9.5 Attaching to local-postgres9.5 local-postgres9.5 | The files belonging to this database system will be owned by user “postgres”. local-postgres9.5 | […]

Why php-fpm from official Docker image doesn't work for me?

I try to run a new container from php:fpm: docker run –name fpmtest -d -p 80:9000 php:fpm By default, it exposes port 9000 in its Dockerfile. Then I log in into container and create index.html file: $ docker exec -i -t fpmtest bash root@2fb39dd6a40b:/var/www/html# echo “Hello, World!” > index.html And inside the container I try […]

Docker: /etc/hosts not automatically updated on source container restart

Let’s say that I have: a pg_db container docker run -d –name pg_db postgres a web container, linked to the pg_db container docker run -d –name web –link pg_db:db my-web-app In the web container, I can access to the pg_db via the /etc/hosts name resolution. # cat /etc/hosts … 172.17.0.17 db But if I restart […]

How to create read-only user in the Docker Registry v2?

I’d like to have 2 users in Docker Registry v2: user1 – read-write (pull-push) user2 – read-only (pull only) How to create read-only user ?

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.