mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-08-09 12:00:51 +08:00
do not start ssh deamon, use nsenter for shell access to the container
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
- [Configuration](#configuration)
|
||||
- [Data Store](#data-store)
|
||||
- [Securing the server](#securing-the-server)
|
||||
- [Maintenance](#maintenance)
|
||||
- [SSH Login](#ssh-login)
|
||||
- [Issues](#issues)
|
||||
|
||||
# Introduction
|
||||
@@ -89,18 +87,6 @@ psql -U postgres -h ${POSTGRESQL_IP}
|
||||
\password postgres
|
||||
```
|
||||
|
||||
# Maintenance
|
||||
|
||||
## SSH Login
|
||||
There are two methods to gain root login to the container, the first method is to add your public rsa key to the authorized_keys file and build the image.
|
||||
|
||||
The second method is use the dynamically generated password. Every time the container is started a random password is generated using the pwgen tool and assigned to the root user. This password can be fetched from the docker logs.
|
||||
|
||||
```bash
|
||||
docker logs postgresql 2>&1 | grep '^User: ' | tail -n1
|
||||
```
|
||||
This password is not persistent and changes every time the image is executed.
|
||||
|
||||
# Upgrading
|
||||
|
||||
To upgrade to newer releases, simply follow this 3 step upgrade procedure.
|
||||
|
||||
Reference in New Issue
Block a user