From 82dc86257604b61466b157f47eeef582d81db6a1 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sat, 28 Jun 2014 19:21:42 +0530 Subject: [PATCH] do not start ssh deamon, use nsenter for shell access to the container --- Dockerfile | 2 -- README.md | 14 -------------- assets/init | 1 - authorized_keys | 0 4 files changed, 17 deletions(-) delete mode 100644 authorized_keys diff --git a/Dockerfile b/Dockerfile index ad080d7..e0e1b6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/README.md b/README.md index 687383b..da3cb82 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/assets/init b/assets/init index 701f6a7..87edbb0 100755 --- a/assets/init +++ b/assets/init @@ -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 diff --git a/authorized_keys b/authorized_keys deleted file mode 100644 index e69de29..0000000