0

我曾经用我的静态网页和 nginx 服务器创建一个 docker 映像,它在我的本地 docker 中工作正常。将该图像推送到我的 docker hub 中。

已在 AWS 中创建 EC2 实例,安全组为 SSH、http 和 https,尝试使用以下命令在 EC2 中拉取该 docker 映像

sudo docker run -p 8080:80 <docker_repo_name>/<tag_name>

我得到以下日志(只有我得到本地 docker 的相同日志)

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Configuration complete; ready for start up

我试过http://<public_IP>:8080但我的网页没有加载

码头工人文件

FROM nginx
COPY . /usr/share/nginx/html
4

0 回答 0