Published on

Navicat Premium Connect Windows Docker Container

Authors
  1. First of all, we go to the Docker official website and find a database image: https://hub.docker.com/_/postgres .For instance, I use PostgreSQL image.

image-20230815151106314

  1. Run a container
docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=123456 -d postgres

-p 5432:5432 : The option maps the 5432 port of host machine to 5432 port of the container. Because PostgreSQL uses the default port 5432 for communication, this option allows host machine access to PostgreSQL service running in container.

  1. Navicat connect container

Just like this:

image-20230815151332468