Reputation: 1774
Hello StackOverflowers,
I am trying to install pgadmin4
using Docker
in Ubuntu 18.04 LTS
, but each time I create a container it crashes.
Here is the command i use:
docker run -p 8082:80 --name pgadmin_server \
-e '[email protected]' \
-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. 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 version 19.03.6, build 369ce74a3c
Btw, I am running Ubuntu 18.04 LTS on 32 bit machine
Thank you for your help
Upvotes: 0
Views: 785
Reputation: 311606
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.
It's more common to find multiarch support in "official" images:
Most of the official images on Docker Hub provide a variety of architectures. For example, the busybox image supports amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, ppc64le, and s390x. When running this image on an x86_64 / amd64 machine, the x86_64 variant will be pulled and run.
(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. You can use the skopeo tool to do this, although the process is still a little non-obvious. To see the list of architecture for a multi-architecture image, we need to use the --raw
option:
$ 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:
$ skopeo inspect docker://dpage/pgadmin4 | python -mjson.tool | grep -i architecture
"Architecture": "amd64",
Upvotes: 1