Skip to content

Commit a6b8662

Browse files
committed
resolves docker-library#282: add default healthcheck to dockerfiles
1 parent 5beb1d4 commit a6b8662

14 files changed

+28
-0
lines changed

10/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
172172
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
173173
ENTRYPOINT ["docker-entrypoint.sh"]
174174

175+
HEALTHCHECK --timeout=5s CMD pg_isready
176+
175177
EXPOSE 5432
176178
CMD ["postgres"]

10/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
150150
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
151151
ENTRYPOINT ["docker-entrypoint.sh"]
152152

153+
HEALTHCHECK --timeout=5s CMD pg_isready
154+
153155
EXPOSE 5432
154156
CMD ["postgres"]

11/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
172172
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
173173
ENTRYPOINT ["docker-entrypoint.sh"]
174174

175+
HEALTHCHECK --timeout=5s CMD pg_isready
176+
175177
EXPOSE 5432
176178
CMD ["postgres"]

11/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
150150
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
151151
ENTRYPOINT ["docker-entrypoint.sh"]
152152

153+
HEALTHCHECK --timeout=5s CMD pg_isready
154+
153155
EXPOSE 5432
154156
CMD ["postgres"]

12/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
172172
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
173173
ENTRYPOINT ["docker-entrypoint.sh"]
174174

175+
HEALTHCHECK --timeout=5s CMD pg_isready
176+
175177
EXPOSE 5432
176178
CMD ["postgres"]

12/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,5 +149,7 @@ VOLUME /var/lib/postgresql/data
149149
COPY docker-entrypoint.sh /usr/local/bin/
150150
ENTRYPOINT ["docker-entrypoint.sh"]
151151

152+
HEALTHCHECK --timeout=5s CMD pg_isready
153+
152154
EXPOSE 5432
153155
CMD ["postgres"]

9.4/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
173173
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
174174
ENTRYPOINT ["docker-entrypoint.sh"]
175175

176+
HEALTHCHECK --timeout=5s CMD pg_isready
177+
176178
EXPOSE 5432
177179
CMD ["postgres"]

9.4/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
148148
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
149149
ENTRYPOINT ["docker-entrypoint.sh"]
150150

151+
HEALTHCHECK --timeout=5s CMD pg_isready
152+
151153
EXPOSE 5432
152154
CMD ["postgres"]

9.5/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
173173
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
174174
ENTRYPOINT ["docker-entrypoint.sh"]
175175

176+
HEALTHCHECK --timeout=5s CMD pg_isready
177+
176178
EXPOSE 5432
177179
CMD ["postgres"]

9.5/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
148148
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
149149
ENTRYPOINT ["docker-entrypoint.sh"]
150150

151+
HEALTHCHECK --timeout=5s CMD pg_isready
152+
151153
EXPOSE 5432
152154
CMD ["postgres"]

9.6/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
173173
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
174174
ENTRYPOINT ["docker-entrypoint.sh"]
175175

176+
HEALTHCHECK --timeout=5s CMD pg_isready
177+
176178
EXPOSE 5432
177179
CMD ["postgres"]

9.6/alpine/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
148148
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
149149
ENTRYPOINT ["docker-entrypoint.sh"]
150150

151+
HEALTHCHECK --timeout=5s CMD pg_isready
152+
151153
EXPOSE 5432
152154
CMD ["postgres"]

Dockerfile-alpine.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,5 +150,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
150150
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
151151
ENTRYPOINT ["docker-entrypoint.sh"]
152152

153+
HEALTHCHECK --timeout=5s CMD pg_isready
154+
153155
EXPOSE 5432
154156
CMD ["postgres"]

Dockerfile-debian.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,5 +173,7 @@ COPY docker-entrypoint.sh /usr/local/bin/
173173
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
174174
ENTRYPOINT ["docker-entrypoint.sh"]
175175

176+
HEALTHCHECK --timeout=5s CMD pg_isready
177+
176178
EXPOSE 5432
177179
CMD ["postgres"]

0 commit comments

Comments
 (0)