dockerで構築したgitlabのrootパスワードを確認する

dockerで構築したgitlabのrootパスワードを確認する手順を記述してます。
環境
- docker image gitlab/gitlab-ce:14.9.2-ce.0
手順
まずは、コンテナ名を確認します。
$ docker ps
CONTAINER ID IMAGE
xxxxxxxxx gitlab/gitlab-ce:14.9.2-ce.0
コンテナ内に、入ります。
$ docker container exec -it xxxxxxxxx bash
コンテナ内に入ると、「/etc/gitlab/initial_root_password」にrootのパスワードが記述されてます。
cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
# 1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
# 2. Password hasn't been changed manually, either via UI or via command line.
#
# If the password shown here doesn't work, you must reset the admin password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.
Password: xxxxxxxxxxxxxxxxxx
# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
以下のコマンドの場合、1行で可能です。
$ sudo docker exec -it xxxxxxxxx grep 'Password:' /etc/gitlab/initial_root_password
-
前の記事
SQL Server 日付から曜日を取得する 2022.04.15
-
次の記事
VSCODE Markdownのプレビューをgithub風にする 2022.04.15
コメントを書く