这是我的步骤--
5. docker run -p 80:80 \
-e '[email protected]' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-d dpage/pgadmin4
docker ps 确认容器正在运行
curl http://localhost 或 http:127.0.0.1 失败
从浏览器 public-ip:80 也失败(超时)
真的很困扰我,感谢任何帮助/指导来解决。
这听起来应该可以正常工作,但以下是我创建相同设置的步骤。
这将允许来自任何外部 IP 的端口 22 (SSH)、80 (HTTP) 和 443 (HTTPS) 上的入站连接。
sudo apt update
和 sudo apt install docker.io
。docker run -p 80:80 \
-e '[email protected]' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-d dpage/pgadmin4
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1bbf1925d84a dpage/pgadmin4 "/entrypoint.sh" 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 443/tcp xenodochial_pike
$ curl http://localhost
<!doctype html>
<html lang=en>
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to the target URL: <a href="/login?next=%2F">/login?next=%2F</a>. If not, click the link.
$ curl http://127.0.0.1
<!doctype html>
<html lang=en>
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to the target URL: <a href="/login?next=%2F">/login?next=%2F</a>. If not, click the link.