How to access Gitlab's metrics (Prometheus and Grafana) from Docker installation?

I installed Gitlab using Docker image on a Ubuntu virtual machine running on a MAC M1 as follows (

docker run \
  --detach \
  --restart always \
  --name gitlab-ce \
  --privileged \
  --memory 4096M \
  --publish 22:22 \
  --publish 80:80 \
  --publish 443:443 \
  --hostname \
    nginx['redirect_http_to_https'] = true; "\
  --volume /srv/gitlab-ce/conf:/etc/gitlab:z \
  --volume /srv/gitlab-ce/logs:/var/log/gitlab:z \
  --volume /srv/gitlab-ce/data:/var/opt/gitlab:z \

All seems to be working correctly on localhost, except that I can’t access the metrics, I got unable to connect error on:

Prometheus: http://localhost:9090
Grafana: http://localhost/-/grafana

I tried enabling metrics as in the documentation, and docker exec -it gitlab-ce gitlab-ctl reconfigure

What I’m missing?