Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested Improvements to README.md #2339

Open
roberts-github-name opened this issue Jun 15, 2023 · 0 comments
Open

Suggested Improvements to README.md #2339

roberts-github-name opened this issue Jun 15, 2023 · 0 comments

Comments

@roberts-github-name
Copy link

The README.md has some hints on how to use the image, but as someone very new to Docker I found it very hard to follow.

After a lot of wrangling I finally figured out how to get things working. Here are some changes I suggest adding to the README.md. I don't know how to make changes to it so I thought I'd leave suggestions here so someone more knowledgeable can do it (or tell me how!).

The main thing I struggled with was trying to start a demo postgres process and connect to it with psql. After struggling a lot I realized that you have to have TWO containers running - one with the postgres process, and a second one running psql.

  1. Directly under "How to use this image," add some text along the lines of "There are three main ways to use this image: to run postgres, run psql to interact with a postgres process already running on another host, or to include a database with other processes in a container using docker compose." Seems obvious in hindsight, but I thought that the docker run ... command given for psql use case would both start a postgres database AND start psql. But that's not what happens. Took a long time to figure that out.
  2. Change "start a postgres instance" to "1. Start a postgres instance". The "1." will help make it clear that it's the first
  3. Change "... or via psql" to "2. Or run psql". The "via" is misleading because it implies the docker run ... command will start postgres via some machinery in the image that will also run psql. But that's not what happens (I think) - if you use the supplied shell command with docker run ..., the docker-entrypoint.sh script will only run psql. It won't also start a postgres database. So the "via" should be removed.
  4. Under the heading for (3) (currently "... or via psql"), add something like "Instead of starting a postgres database, you can use this image to run psql. You can create a test database to interact with the instructions above." This way it's clear that it's an either-or proposition. There's no docker run ... command that will do both.
  5. In the docker run ... commands, replace postgres (the image name) with <image_name> or similar. This makes it clear which argument is the name of the image, versus the default postgres user name, versus the name of the container. It would also be really helpful to explain the image name, such as "image_name can be postgres to automatically use the latest version of postgres, or e.g. postgres:15-alpine to use a specific version."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant