title: Docker Pgadmin 4
body: <p>EDIT</p>
  
  <p><strong>Turned out to a problem with the image, I tried another one and it works fine</strong></p>
  
  <hr>
  
  <p>I'm trying to run Pgadmin 4 as server mode using Docker on Debian 9. I have followed the instructions on <a href="https://hub.docker.com/r/dpage/pgadmin4/" rel="noreferrer">https://hub.docker.com/r/dpage/pgadmin4/</a>  I start it by the following command</p>
  
  <pre><code>docker run -p 5050:5050 -e "PGADMIN_DEFAULT_EMAIL=myemail@gmail.com" -e "PGADMIN_DEFAULT_PASSWORD=a12345678" -d  dpage/pgadmin4
  </code></pre>
  
  <p>I don't get any errors, and <code>docker ps</code> shows the status as below</p>
  
  <pre><code>root@poweredge:~# docker ps
  CONTAINER ID        IMAGE               COMMAND                 CREATED             STATUS              PORTS                                     NAMES
  c4b11e4bceb7        dpage/pgadmin4      "/bin/bash /entry.sh"   12 seconds ago      Up 10 seconds       80/tcp, 443/tcp, 0.0.0.0:5050-&gt;5050/tcp   upbeat_jackson
  </code></pre>
  
  <p>But when I go to serverip:5050 nothing loads. Any idea what the problem may be here?</p>
  
  <p>On the local machine when I execute <code>curl http://localhost:5050</code> I get <code>Connection reset by peer</code> if the docker instance is running</p>
  
  <pre><code>root@poweredge:~# curl http://localhost:5050
  curl: (56) Recv failure: Connection reset by peer
  </code></pre>
  
  <p>if I stop the Docker instance, I get</p>
  
  <pre><code>root@poweredge:~# curl http://localhost:5050
  curl: (7) Failed to connect to localhost port 5050: Connection refused
  </code></pre>