alpinelinux / docker-alpine

Official Alpine Linux Docker image. Win at minimalism!
MIT License
1.11k stars 264 forks source link

docker ps doesn't show any container in arm64v8 #92

Open jiapei100 opened 4 years ago

jiapei100 commented 4 years ago

Hi, my original question is posted on docker forum. After some investigation, I found a similar issue on StackOverflow . I just tested the following methods on my 32bit Raspberry Pi, everything works fine. docker ps found the running container.

pi@pi02:~ $ docker pull arm32v6/alpine
Using default tag: latest
latest: Pulling from arm32v6/alpine
b4b72e716706: Pull complete 
Digest: sha256:71465c7d45a086a2181ce33bb47f7eaef5c233eace65704da0c5e5454a79cee5
Status: Downloaded newer image for arm32v6/alpine:latest
docker.io/arm32v6/alpine:latest
pi@pi02:~ $ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
arm32v6/alpine      latest              3ddac682c5b6        11 days ago         4.77MB
pi@pi02:~ $ docker run -it -d arm32v6/alpine
191022f68e9fb7e8d363da5d1294b0e84f2c4610bf6c5d62c11898138c8dbd51
pi@pi02:~ $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
191022f68e9f        arm32v6/alpine      "/bin/sh"           9 seconds ago       Up 3 seconds                            awesome_moser
pi@pi02:~ $ docker exec -it 191022f68e9f /bin/sh
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.12.0
PRETTY_NAME="Alpine Linux v3.12"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/ # exit
pi@pi02:~ $ 

However, for my new Raspberry Pi 8G with the 64 bit Raspberry Pi OS, I failed to have a running container, please refer to:

pi@pi01:~ $ docker pull arm64v8/alpine
Using default tag: latest
latest: Pulling from arm64v8/alpine
b538f80385f9: Pull complete 
Digest: sha256:3b3f647d2d99cac772ed64c4791e5d9b750dd5fe0b25db653ec4976f7b72837c
Status: Downloaded newer image for arm64v8/alpine:latest
docker.io/arm64v8/alpine:latest
pi@pi01:~ $ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
arm64v8/alpine      latest              62ee0e9f8440        11 days ago         5.32MB
pi@pi01:~ $ docker run -it -d arm64v8/alpine
561025c3974e172a40e96fcd067c4ff311418cd122db20fc12b751d97ffc7092
pi@pi01:~ $ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
pi@pi01:~ $ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                        PORTS               NAMES
4f3ae63da041        arm64v8/alpine      "/bin/sh"           12 minutes ago      Exited (159) 12 minutes ago                       suspicious_neumann
pi@pi01:~ $ docker exec -it 4f3ae63da041 /bin/sh
Error response from daemon: Container 4f3ae63da04139ddc4d8378c3b3d135ace4739fca321e9bc4d7f0f537b62429e is not running
pi@pi01:~ $ 

It's clearly telling the container is NOT running. In fact, I noticed that the container ran for just 1 second or so, then stopped running. How can I have a running container that keeps running using image arm64v8/alpine???

Thank you very much Pei

rdebath commented 4 years ago

You'd need to find out why it's dropped out. But, I would guess there's something different in the setup WRT reading from the standard input when there's nothing there. So, you shouldn't do that eg:

docker run -d arm64v8/alpine sh -c 'while :;do sleep 1d;done'

or

docker run -d arm64v8/alpine sleep 3650d