Commit 30178565 authored by Jason Plum's avatar Jason Plum
Browse files

Merge branch 'add-reg-healthcheck' into 'master'

Fix registry healthcheck

See merge request gitlab-org/build/CNG!675
parents 4e826483 9696436f
Pipeline #5271 failed with stages
in 50 seconds
......@@ -36,7 +36,7 @@ ARG GITLAB_USER=git
# create gitlab user
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates apache2-utils \
&& apt-get install -y --no-install-recommends ca-certificates apache2-utils curl \
&& rm -rf /var/lib/apt/lists/* \
&& adduser --disabled-password --gecos 'GitLab' ${GITLAB_USER}
......@@ -50,3 +50,5 @@ ENV CONFIG_DIRECTORY=/etc/docker/registry
ENV CONFIG_FILENAME=config.yml
CMD exec /bin/registry serve ${CONFIG_DIRECTORY}/${CONFIG_FILENAME}
HEALTHCHECK --interval=30s --timeout=30s --retries=5 CMD /scripts/healthcheck
......@@ -2,6 +2,6 @@
set -e
status=$(curl --retry 6 -s -q -w '%{http_code}' http://127.0.0.1:${GITLAB_CONTAINER_REGISTRY_LISTEN_PORT:-5000}/v2/)
status=$(curl --retry 6 -s -q -o /dev/null -w '%{http_code}' http://127.0.0.1:${GITLAB_CONTAINER_REGISTRY_LISTEN_PORT:-5000}/v2/)
[[ '200 401' =~ "$status" ]]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment