- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试浏览一个在 docker/podman 容器实例中启动应用程序的教程。
我尝试使用 -p port:port 和 --expose port 但似乎都不起作用。
我已使用 ss -an 确保我看到端口处于监听状态。
我已经确定没有其他任何东西试图绑定(bind)到那个端口。
无论我做什么,我永远无法访问 localhost:port 或 ip_address:port。
我觉得我从根本上错过了一些东西,但不知道下一步该去哪里。
对于要尝试的事情或要审查的文档的任何建议,我们将不胜感激。
谢谢,
肖恩
最佳答案
公开:(Reference)
Expose tells Podman that the container requests that port be open, butdoes not forward it. All exposed ports will be forwarded to randomports on the host if and only if --publish-all is also specified
根据 Containerfile 的 Redhat 文档,
EXPOSE indicates that the container listens on the specified networkport at runtime. The EXPOSE instruction defines metadata only; it doesnot make ports accessible from the host. The -p option in the podmanrun command exposes container ports from the host.
要指定端口号,
The -p option in the podman run command exposes container ports fromthe host.
示例:
podman run -d -p 8080:80 --name httpd-basic quay.io/httpd-parent:2.4
在上面的例子中,端口号 80 是容器监听/公开的端口号,我们可以通过端口号 8080 从容器外部访问它
关于networking - 无法使用 podman 公开端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69859279/
我正在运行一些应用程序,其中应用程序必须知道它在 PODMAN 内运行而无需任何额外的环境变量,但容器内的 podman 配置必须提供详细信息而无需任何用户交互。 截至目前,我正在使用 cat /pr
当我做类似 podman rmi d61259d8f7a7 -f 的事情时它失败并显示一条消息:Error: unable to delete "vvvvvvvvvvvv" (cannot be fo
我的主目录中几乎没有剩余的磁盘空间,但是 我在目录/scratch/tmpexperiment 中有很多磁盘空间。该目录现在是空的。 我想试试命令 podman和 buildah (只是为了实验和学习
我正在尝试在 Red Hat Enterprise Linux 8 (CentoOS 8) 虚拟机中设置构建服务器。 我通过运行 sudo dnf install -y @container-tool
一个非 root 用户一直在尝试运行 podman 和 buildah 命令,但现在只想重置所有内容恢复到开始实验前的状态(即所有容器镜像和容器应该连同 buildah 和 podman 配置一起删除
我在 RHEL8 上运行 podman 2.0.5,我对使用 sudo 与不使用 sudo 调用命令时它的工作原理感到困惑。特别令人困惑的是当我运行端口映射并试图通过主机公开端口时。使用 sudo p
有没有办法在 Podman 中运行 Podman,类似于在 Docker 中运行 Docker 的方式? 这是我的 Dockerfile 的一个片段,它强烈基于 another question :
我对firewalld、podman 和UDP/Multicast 越来越着迷。当我看到 UDP 数据包到达 podman 时;使用 tcpdump 命令确认。看来我无法配置使用名为 knx_mult
我正在 MacOS Catalina 10.15.7 中安装 podman: ~/source/dabai/microservice/soa-illidan-hub on feature/card
我正在尝试使用 podman 桌面替换 docker 桌面。当我安装这个podman桌面并打开它时,它一直处于初始化状态。我不知道它有什么问题。有人遇到过同样的问题吗? 我想安装和使用 podman
我想要完成的是连接到安装在主机系统上的数据库。现在有一个similar question already for docker ,但我无法让它与 Podman 一起工作,我想是因为网络在这里的工作方式
是否可以为已经运行的 pod 额外公开端口? 如果我创建一个新的 pod,我会为它们提供 podman pod create ... -p 8080:80 . 但是,我不想扔掉我的 pod,只需修改它
我想知道是否可以运行一个 rootless podman 容器在容器内启用 systemd(不要与控制容器本身的 systemd 服务混淆)在主机系统级别!)?如果是,我需要什么? 这是一个简单的 D
是否有可能使用 podman 更改容器重启策略?我们可以在创建容器时设置策略 podman run --restart always ,但是创建容器时如何更改它? 使用 docker 我们有 dock
我的服务器在 podman 中运行 gitlab。 我想要 gitlab 连接子域。 测试命令 podman start gitlab-ce --VIRTUAL-HOST=test.example.c
对于 docker,这可以通过在容器内安装 docker.sock 来实现。 但是由于podman中没有守护进程。 docker.sock 的替代品是什么? 我通常想检查主机上显示的 podman 镜
我正在尝试浏览一个在 docker/podman 容器实例中启动应用程序的教程。 我尝试使用 -p port:port 和 --expose port 但似乎都不起作用。 我已使用 ss -an 确保
我正在尝试浏览一个在 docker/podman 容器实例中启动应用程序的教程。 我尝试使用 -p port:port 和 --expose port 但似乎都不起作用。 我已使用 ss -an 确保
尝试这个命令 podman login -u xxx@xxx.com -p XXX@XXX_XXXXX -v docker.io
我正在使用 podman 在 CentOS 上运行虚拟环境。当我使用 podman run 命令的 --net 选项时,出现错误。 [user@server ~]$ podman run --net
我是一名优秀的程序员,十分优秀!