docker-library / healthcheck Goto Github PK
View Code? Open in Web Editor NEWhttps://github.com/docker/docker/issues/21142 prototypes
Home Page: https://github.com/docker-library/faq#healthcheck
License: MIT License
https://github.com/docker/docker/issues/21142 prototypes
Home Page: https://github.com/docker-library/faq#healthcheck
License: MIT License
Thanks for providing this useful container! I have a question about two cassandra configs: enable_materialized_views
and enable_transient_replication.
It seems the official document
does not recommend to enable them in production but but they are set to be enabled in /etc/cassandra/cassandra.yaml
:
Shall we disable them?
Thanks!
Maybe this isn't the proper place to ask, but is there any particular reason the prototyping that has occurred within these images haven't made its way into the official images? HEALTHCHECK
is an advertised feature of Dockerfile
s and it feels that official images should show the way forward and demonstrate how to check upon themselves.
When container is in multiple networks, most of the healthchecks fail.
The reason is that commands like
host="$(hostname -i || echo '127.0.0.1')"
(from postgres, redis), and
host="$(hostname --ip-address || echo '127.0.0.1')"
(from elasticsearch)
use hostname -i
which in case of multiple networks return multiple ips.
i.e.
[root@ccaa85c77ed1 elasticsearch]# hostname --ip-address
192.168.208.3 192.168.176.2
so $host becomes invalid.
Healthcheck scripts didn't work (timeout and service unhealthy in docker ps) in alpine images of rabbitmq and postgres, until i added the following command in Dockerfile:
RUN chmod +x /usr/local/bin/docker-healthcheck
Docker CE v17.03.0-ce-mac2 (15654)
To keep alpine images as light and as close to as possible to upstream, the healthcheck scripts here could be for plain /bin/sh
instead.
Hello all!
Thanks for sharing this. I've tried your healtcheck method with postgres using https://hub.docker.com/r/mdillon/postgis/~/dockerfile/ as the base image and everything works as expected when in non-swarm mode. Whenever I try to the same image in swarm mode, it never stays in running
mode. Is it incompatible? It looks like it is ready to run, but, after a while, there is a shutdown request, as seen in the logs:
test-swarm_db.1.w83nr7m4m3wq@test-docker-swarm-test2-manager | LOG: received smart shutdown request
test-swarm_db.1.w83nr7m4m3wq@test-docker-swarm-test2-manager | LOG: autovacuum launcher shutting down
test-swarm_db.1.w83nr7m4m3wq@test-docker-swarm-test2-manager | LOG: shutting down
test-swarm_db.1.w83nr7m4m3wq@test-docker-swarm-test2-manager | LOG: database system is shut down
test-swarm_db.1.juy14y8pi8xu@test-docker-swarm-test2-manager | LOG: database system was shut down at 2017-03-21 16:43:58 UTC
Thank you all in advance!
EDIT: Nvm, it looks like everything is ok - I just add a versioning problem....
Thanks for all the work you're doing @tianon ๐
Would love to see alpine images with health check :) postgres:latest
is 100mb+ while postgres:alpine
is 14mb
Hi,
you can try using mysqladmin to check whether the MySQL server is alive. I do the following in a project for blocking the docker start sequence until the server has been initialized. What happens is that a COM_PING packet is sent over the wire to the server. Here is some documentation about the COM_PING packet:
https://dev.mysql.com/doc/internals/en/com-ping.html
while [[ `mysqladmin ping -uroot -p$$MYSQL_ROOT_PASSWORD 2>/dev/null` != "mysqld is alive" ]] ; \
do echo Waiting MySQL Server to start...; sleep 1; \
done ; \
A SELECT query will increase a statistical variable about the queries. If someone is using it this will skew the results.
It would be nice to be able to use specific version of postgres:
for instance:
postgres:
image: healthcheck/postgres:9.5
Hi!
I am using the healthcheck/mysql
. The interval for healthcheck seems to be set to 30s by default from my observation. I am wondering is there a way to change the interval?
Thanks!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.