# Is it possible to login into the postgres database inside the docker image?

**URL:** <https://meta.discourse.org/t/is-it-possible-to-login-into-the-postgres-database-inside-the-docker-image/35167>\
**Category:** Self-hosting\
**Created:** [2015 年 11 月 2 日午前 12:48 UTC](https://meta.discourse.org/t/is-it-possible-to-login-into-the-postgres-database-inside-the-docker-image/35167 "2015-11-02T00:48:52Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2023 年 1 月 26 日午前 4:29 UTC](https://meta.discourse.org/t/is-it-possible-to-login-into-the-postgres-database-inside-the-docker-image/35167/10 "2023-01-26T04:29:27Z")

</div>

> [@tgxworld](#):
>
> ```plaintext
> ./launcher enter app
> su postgres -c "psql discourse"
> 
> ```

ここに更新された手順はありますか？今試すと、次のようになります。

```plaintext
root@endoffice-b:/var/discourse# su postgres -c "psql discourse"
No passwd entry for user 'postgres'

```

あ、すみません、再起動したらうまくいきました。

```plaintext
root@endoffice-b:/var/discourse# ./launcher enter app
x86_64 arch detected.
WARNING: containers/app.yml file is world-readable. You can secure this file by running: chmod o-rwx containers/app.yml
root@endoffice-b-app:/var/www/discourse# su postgres -c 'psql discourse'
psql (13.7 (Debian 13.7-1.pgdg110+1))
Type "help" for help.

```

基本的に、Dockerコンテナを起動する必要がありました。

`./launcher start app`

---

_[View the full topic](https://meta.discourse.org/t/is-it-possible-to-login-into-the-postgres-database-inside-the-docker-image/35167)._
