From 15ad2915b95bd13067691ed3c7dcab67f529d37f Mon Sep 17 00:00:00 2001 From: Jordan Arentsen Date: Tue, 24 Sep 2013 02:12:24 -0500 Subject: [PATCH 1/3] various command fixes Indicating the repository and tag should be separated by a space and not a '/'. Also fixed a quote typo. --- docs/sources/examples/postgresql_service.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sources/examples/postgresql_service.rst b/docs/sources/examples/postgresql_service.rst index 27543ec5a..c0b5404d1 100644 --- a/docs/sources/examples/postgresql_service.rst +++ b/docs/sources/examples/postgresql_service.rst @@ -66,14 +66,14 @@ other roles. Following Vagrant's convention the role will be named .. code-block:: bash - sudo -u postgres createuser -P -d -r -s docker + sudo postgres -c "createuser -P -d -r -s docker" Create a test database also named ``docker`` owned by previously created ``docker`` role. .. code-block:: bash - sudo -u postgres createdb -O docker docker + sudo postgres -c "createdb -O docker docker" Adjust PostgreSQL configuration so that remote connections to the database are possible. Make sure that inside @@ -99,7 +99,7 @@ Bash prompt; you can also locate it using ``docker ps -a``. .. code-block:: bash - docker commit /postgresql + docker commit postgresql Finally, run PostgreSQL server via ``docker``. @@ -149,10 +149,10 @@ container starts. .. code-block:: bash - sudo docker commit /postgresql -run='{"Cmd": \ + sudo docker commit postgresql -run='{"Cmd": \ ["/bin/su", "postgres", "-c", "/usr/lib/postgresql/9.2/bin/postgres -D \ /var/lib/postgresql/9.2/main -c \ - config_file=/etc/postgresql/9.2/main/postgresql.conf"], PortSpecs": ["5432"]} + config_file=/etc/postgresql/9.2/main/postgresql.conf"], "PortSpecs": ["5432"]}' From now on, just type ``docker run /postgresql`` and PostgreSQL should automatically start. From 17b7194d91ba91e044155edf7ae0a485c2dd9c0b Mon Sep 17 00:00:00 2001 From: blissdev Date: Tue, 24 Sep 2013 02:25:16 -0500 Subject: [PATCH 2/3] use su instead of sudo --- docs/sources/examples/postgresql_service.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sources/examples/postgresql_service.rst b/docs/sources/examples/postgresql_service.rst index c0b5404d1..9e5bda507 100644 --- a/docs/sources/examples/postgresql_service.rst +++ b/docs/sources/examples/postgresql_service.rst @@ -66,14 +66,14 @@ other roles. Following Vagrant's convention the role will be named .. code-block:: bash - sudo postgres -c "createuser -P -d -r -s docker" + su postgres -c "createuser -P -d -r -s docker" Create a test database also named ``docker`` owned by previously created ``docker`` role. .. code-block:: bash - sudo postgres -c "createdb -O docker docker" + su postgres -c "createdb -O docker docker" Adjust PostgreSQL configuration so that remote connections to the database are possible. Make sure that inside From c000e6a7fce11aaddae916853cc551d4801c1f8e Mon Sep 17 00:00:00 2001 From: blissdev Date: Tue, 24 Sep 2013 15:51:21 -0500 Subject: [PATCH 3/3] revert removal of slash betwixt user/repo --- docs/sources/examples/postgresql_service.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/examples/postgresql_service.rst b/docs/sources/examples/postgresql_service.rst index 9e5bda507..2df02b40c 100644 --- a/docs/sources/examples/postgresql_service.rst +++ b/docs/sources/examples/postgresql_service.rst @@ -99,7 +99,7 @@ Bash prompt; you can also locate it using ``docker ps -a``. .. code-block:: bash - docker commit postgresql + docker commit /postgresql Finally, run PostgreSQL server via ``docker``.