如何在 Gitlab Docker 镜像中运行 psql
使用官方 gitlab Docker 容器时,你可以使用此命令运行 psql:
docker-exec-psql.sh
docker exec -t -u gitlab-psql [container name] psql -h /var/opt/gitlab/postgresql/ -d gitlabhq_production如果你使用基于 docker-compose 的设置,使用此命令:
docker-compose-psql.sh
docker-compose exec -u gitlab-psql gitlab psql -h /var/opt/gitlab/postgresql/ -d gitlabhq_production注意此命令中的 gitlab 是容器名称。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow