How to have local conectivity with docker image?

following Running Percona Server for MySQL in a Docker Container

the first command doesn’t expose a network and assume you will use docker veth setup to attach another container.

My goal is to reach the server with my local development for tests (outside of docker)

i tried starting it up with

docker run -d \
  --network=host \
  --name ps \

and even passing "--port=3306"

Also tried to wrap it in another Dockerfile that was basically:

FROM percona/percona-server:8.0

But no matter what, i never get any port listening from the container. Is this image socket only?

1 Like

Launch the container using docker port mapping to access MySQL within the container from outside.

1 Like