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