do not start ssh deamon, use nsenter for shell access to the container

This commit is contained in:
Sameer Naik
2014-06-28 19:21:42 +05:30
parent db0a75e9ab
commit 82dc862576
4 changed files with 0 additions and 17 deletions
-2
View File
@@ -9,8 +9,6 @@ ADD assets/ /app/
RUN chmod 755 /app/init /app/setup/install
RUN /app/setup/install
ADD authorized_keys /root/.ssh/
EXPOSE 5432
VOLUME ["/var/lib/postgresql"]
-14
View File
@@ -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.
-1
View File
@@ -9,7 +9,6 @@ echo User: root Password: $ROOT_PASSWORD
# start supervisord
/usr/bin/supervisord
supervisorctl start sshd
appStart () {
# fix permissions and ownership of /var/lib/postgresql
View File