Documentation for the container registry metadata database on GitLab Docker installations
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Description
I'm creating this issue to highlight that the current documentation for the container registry metadata database does not cover the Docker Installation use case.
The previous Documentation for the container registry metadata database issue covered omnibus and helm chart installs, but not the Docker installations of GitLab
I tested the apply database migration steps in my docker installation, and it fails due to the lack of sudo
in the docker image.
root@gitlab:/# gitlab-ctl registry-database migrate up
Running migrate up
Executing command:
/opt/gitlab/embedded/bin/registry database migrate up /var/opt/gitlab/registry/config.yml
ERRO[0000] Connect database=registry duration_ms=35 err="failed to connect to `user=registry database=registry`: /var/opt/gitlab/postgresql/.s.PGSQL.5432 (/var/opt/gitlab/postgresql): server error: FATAL: Peer authentication failed for user \"registry\" (SQLSTATE 28000)" host=/var/opt/gitlab/postgresql port=5432
failed to construct database connection: verification failed: failed to connect to `user=registry database=registry`: /var/opt/gitlab/postgresql/.s.PGSQL.5432 (/var/opt/gitlab/postgresql): server error: FATAL: Peer authentication failed for user "registry" (SQLSTATE 28000)
The following command allowed me to work around the issue:
su - registry -s /bin/bash -c "/opt/gitlab/embedded/bin/registry database migrate up /var/opt/gitlab/registry/config.yml"
Edited by 🤖 GitLab Bot 🤖