简体   繁体   English

无法在 Ubuntu 18.04 LTS 上运行 pgadmin4 docker

[英]Unable to run pgadmin4 docker on Ubuntu 18.04 LTS

Hello StackOverflowers,你好 StackOverflowers,

I am trying to install pgadmin4 using Docker in Ubuntu 18.04 LTS , but each time I create a container it crashes.我正在尝试在Ubuntu 18.04 LTS中使用Docker安装pgadmin4 ,但每次创建容器时它都会崩溃。

Here is the command i use:这是我使用的命令:

docker run -p 8082:80 --name pgadmin_server \
-e 'PGADMIN_DEFAULT_EMAIL=user@domain.com' \
-e 'PGADMIN_DEFAULT_PASSWORD=password' \
 dpage/pgadmin4

Here is the result i get这是我得到的结果

standard_init_linux.go:211: exec user process caused "exec format error"

When i run docker container ls -a , this is what i get.当我运行docker container ls -a时,这就是我得到的。 My container has been shutdown我的容器已关闭

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS                    NAMES
034b89accaae        dpage/pgadmin4      "/entrypoint.sh"         5 minutes ago       Exited (1) 4 minutes ago                            pgadmin_server
1e660903663e        postgres:9.2        "docker-entrypoint.s…"   48 minutes ago      Up 48 minutes              0.0.0.0:5432->5432/tcp   postgres_container

And here is the docker version i use:这是我使用的 docker 版本:

Docker version 19.03.6, build 369ce74a3c

Btw, I am running Ubuntu 18.04 LTS on 32 bit machine顺便说一句,我在 32 位机器上运行 Ubuntu 18.04 LTS

Thank you for your help谢谢您的帮助

When you build an image locally, it will by default be built for the same architecture as your local host.当您在本地构建映像时,默认情况下它将为与本地主机相同的架构构建。 Since most x86 systems these days are 64 bit systems (to the point that many distributions have dropped support for the 32 bit x86 architecture), that means that the vast majority of images you find will only run on x86_64 systems.由于如今大多数 x86 系统都是 64 位系统(以至于许多发行版已经放弃了对 32 位 x86 架构的支持),这意味着您找到的绝大多数图像只能在 x86_64 系统上运行。

It's more common to find multiarch support in "official" images:在“官方”映像中找到多架构支持更为常见:

Most of the official images on Docker Hub provide a variety of architectures. Docker Hub上的大部分官方镜像都提供了多种架构。 For example, the busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x.例如,busybox 镜像支持 amd64、arm32v5、arm32v6、arm32v7、arm64v8、i386、ppc64le 和 s390x。 When running this image on an x86_64 / amd64 machine, the x86_64 variant will be pulled and run.在 x86_64 / amd64 机器上运行此映像时,将拉取并运行 x86_64 变体。

(That quote is from the following link) (该报价来自以下链接)

While there is support for building multi-architecture images , that requires explicit configuration by the person building the image.虽然支持构建多架构映像,但这需要构建映像的人进行明确配置。

I don't believe that Docker provides any tools for conveniently exploring the supported architecture for a given image.我不相信 Docker 提供任何工具来方便地探索给定图像的支持架构。 You can use the skopeo tool to do this, although the process is still a little non-obvious.您可以使用skopeo工具来执行此操作,尽管该过程仍然有点不明显。 To see the list of architecture for a multi-architecture image, we need to use the --raw option:要查看多架构映像的架构列表,我们需要使用--raw选项:

$ skopeo inspect --raw docker://busybox | python -mjson.tool | grep -i architecture
                "architecture": "amd64",
                "architecture": "arm",
                "architecture": "arm",
                "architecture": "arm",
                "architecture": "arm64",
                "architecture": "386",
                "architecture": "mips64le",
                "architecture": "ppc64le",
                "architecture": "s390x",

For single architecture images, the above will yield no results;对于单一架构图像,以上将不会产生任何结果; in that case, drop the --raw to see the architecture:在这种情况下,删除--raw以查看架构:

$ skopeo inspect docker://dpage/pgadmin4 | python -mjson.tool | grep -i architecture
    "Architecture": "amd64",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Docker 在自定义路径上运行 pgAdmin4 - Run pgAdmin4 on a custom path with Docker 无法使用 TypeORM + pgAdmin4 连接到在 docker 上运行的本地 PostgreSQL 数据库 - Unable to connect to a local PostgreSQL database running on docker with TypeORM + pgAdmin4 pgadmin4 docker 无法转储服务器配置; 没有名为“flask”的模块 - pgadmin4 docker unable to dump servers config; No module named 'flask' 尝试在 linux ubuntu 18.04 LTS 上安装 docker 存储库时出错 - Error by trying installing docker repository on linux ubuntu 18.04 LTS 无法在我的机器上运行Spark(Ubuntu 18.04) - Unable to run spark on my machine (Ubuntu 18.04) 无法运行 Salesforce trailhead 用户界面 API Docker、Z3D945423F8E94B4460429 上的“安装示例应用程序”。 - Unable to run Salesforce trailhead User Interface API “Install the Sample App” on Docker, Ubuntu 18.04 如何在 ubuntu 18.04 LTS 上更改 docker 的根目录? (docker 更改卷的位置) - how to change root dir of docker on ubuntu 18.04 LTS? (docker change location of volumes) Docker 中的反向代理使用 PgAdmin4 的 Nginx - Reverse proxy in Docker using Nginx for PgAdmin4 Docker compose 容器在 pgAdmin4 中不可见 - Docker compose container is not visible inside pgAdmin4 如何更新 Pgadmin4 docker 映像? - How to update the Pgadmin4 docker image?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM