![]() The -v is used to mount ‘pgdata’ to the container path. If these values are not provided, it will use the default value of “postgres”. It sets the password, user and the database. The -e sets an environment variable containing the value of the Docker container. The -d is used to enable the launcher of the container in the background. This means you’ll able to run applications outside of the Docker container and connect to the PostgreSQL server. ![]() The -p 5432:5432 binds the port on localhost to the container. ![]() Let’s take a closer look at how it works: There’s a lot going on in the command shown above. CONTAINER ID IMAGE Now you can u COMMAND CREATED STATUS PORTS NAMESī2e72fa0444f postgres "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 0.0.0.0:5432->5432/tcp silly_sinoussi
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |