[英]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.