What's the sudo password for the Docker container?

I would like to try to ping the 192.168.3.2 from the Docker image of SK, but I can't install ping utils because I need the sudo password. Can somebody please tell me what that is?
6 Replies
Teppo Kurki
Teppo Kurki2mo ago
i don't think sudo is available, not a question of knowing the password
Mastiff
Mastiff2mo ago
I see. I managed to do it by using a bit of extra code building the image:
build:
dockerfile_inline: |
FROM cr.signalk.io/signalk/signalk-server:latest
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends iputils-ping sshpass openssh-client
USER node
build:
dockerfile_inline: |
FROM cr.signalk.io/signalk/signalk-server:latest
USER root
RUN apt-get update \
&& apt-get install -y --no-install-recommends iputils-ping sshpass openssh-client
USER node
(The SSH stuff wasn't necessary, but I already had that in another Docker Compose file for Node-RED). Turns out that pinging does not work in Bridge mode:
pi@MadMax:/media/pi/Docker/Docker-Compose/SignalK $ docker exec -it SignalK sh
$ ping 192.168.3.2
PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data.
From 172.17.0.1 icmp_seq=1 Destination Port Unreachable
pi@MadMax:/media/pi/Docker/Docker-Compose/SignalK $ docker exec -it SignalK sh
$ ping 192.168.3.2
PING 192.168.3.2 (192.168.3.2) 56(84) bytes of data.
From 172.17.0.1 icmp_seq=1 Destination Port Unreachable
So that explains a bit of the problem we spoke about with GPSD.
Teppo Kurki
Teppo Kurki2mo ago
well, too bad it does not really give much if any more information - it also fails does pinging 1.1.1.1 for example work?
Mastiff
Mastiff2mo ago
Yeah, that works.
Teppo Kurki
Teppo Kurki2mo ago
does your machine have anything special related to routing or firewalls?
Mastiff
Mastiff2mo ago
It's a Pi 4 set up as 192.168.3.1, to be a router, but the routing is to get from the boat's 192.168.3.x network to my cabin's 192.168.2.x network. Routing is set up in Network Manager, with wifi in and LAN out from Pi 192.168.3.1 to Pi 192.168.3.2. Pi 192.168.3.2 is running as an access point forp hones, tablet and a bunch of ESP32's in the boat. As far as I know there is no firewall active. At least I haven't installed one. I can't ping the ESP32's either, they are on 192.168.3.100 and up. So the Pi with GPSD and the Pi with SignalKL are on the same segment, connected by a LAN cable.
Want results from more Discord servers?
Add your server