Beaglebone-green-node image hangs on run


#1

This is the startup log for my container which is hanging:

Systemd init system enabled.
systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR)
Detected virtualization 'other'.
Detected architecture 'arm'.
Set hostname to <6d0673a96234>.
Failed to configure loopback device: Permission denied

I’m running the container like this:

sudo docker run \
-it \
--name bbg \
-v ~/Documents/project:/home/debian/Documents/project \
--device=/dev/ttyS2 \
--device=/dev/ttyS4 \
--device=/dev/rtc1 \
--privileged \
spruce/beaglebone-green-node bash

I can hold CTRL and press P then Q to exit that and see that my docker container is still running, after which I can log into it with sudo docker exec -it bbg bash but I’d like to overcome the problem and understand it better.


Is there a better way to get my network interface switching between eth0 and ppp0?
#2

Hi,

This happens because the image you are using is setting the entry point. In order to overwrite that you will need to run it with an - -entrypoint argument.

Ref. : https://docs.docker.com/engine/reference/run/#entrypoint-default-command-to-execute-at-runtime

Regards,
Andrei


#5

Thanks @agherzan but when I change

CMD [ “/home/debian/startup.sh” ]
to

ENTRYPOINT [ “/home/debian/startup.sh” ]
I can install the container without it appearing to hang but when I do docker ps -a I can see my container just keeps restarting and I can’t log in.

Conversely, if I use CMD, it appears to hang and I see a log in my console from the .sh script over and over but when I CMD-Q, CMD-A to break out and docker ps -a, I can see the docker is continuously up, not restarting. Further, I can log in.

Any more suggestions? Thanks!