Unverified Commit 9696436f authored by DJ Mountney's avatar DJ Mountney
Browse files

Fix registry healthcheck

And also add it for the non-ubi images
parent 4e826483
......@@ -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" ]]
Supports Markdown
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