Hello,
I have been trying to run docker on a SBC but i came by some problems.
I installed docker, and run it on rootless mode. It’s working as expected.
I want to run containers for some services (portainer for exemple), but i encountered a problem with the ports.
I can’t seem to bind container’s port to host port (host port not opened) so i can access it outside my server.
Here is the docker command i used to run the container :
docker run -d -p 9443:9443 --name=portainer --restart=always -v /$XDG_RUNTIME_DIR/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.20.3
Before that, i created a volume for it as said by portainer docs :
docker volume create portainer_data
It’s running. Here is the output for docker ps :
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
31311d5900c6 portainer/portainer-ce:2.20.3 "/portainer" 8 hours ago Up About an hour 8000/tcp, 9000/tcp, 0.0.0.0:9443->9443/tcp portainer
The problem i have is that the port “9443” is not opened. When i run netstat or ss -tupln, there is no listening on port 9443.
I already created a firewall rule on ufw (using docker-ufw) :
Status: active
To Action From
-- ------ ----
9443/tcp ALLOW FWD 192.168.1.0/24
I have been looking and trying alot of solutions found on the internet for about 3 days now, and i still can’t manage this port problem.
P.S : running curl command doesn’t work either, tried on 127.0.0.1, my host’s ip, container’s ip and docker’s ip.
I have tried with other images, same problem.
Docker version :
Client: Docker Engine - Community
Version: 27.0.3
API version: 1.46
Go version: go1.21.11
Git commit: 7d4bcd8
Built: Sat Jun 29 00:03:24 2024
OS/Arch: linux/arm64
Context: rootless
Server: Docker Engine - Community
Engine:
Version: 27.0.3
API version: 1.46 (minimum version 1.24)
Go version: go1.21.11
Git commit: 662f78c
Built: Sat Jun 29 00:03:24 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.18
GitCommit: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
runc:
Version: 1.7.18
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0
rootlesskit:
Version: 2.0.2
ApiVersion: 1.1.1
NetworkDriver: slirp4netns
PortDriver: slirp4netns
StateDir: /run/user/1000/dockerd-rootless
slirp4netns:
Version: 1.0.1
GitCommit: 6a7b16babc95b6a3056b33fb45b74a6f62262dd4
If you need any more information, i can provide it.
Thank you in advance for your time.