Issue in docker-in-docker devcontainer

getting below issue while running docker-in-docker in devcontainer: "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the daemon runningg?"
9 Replies
Codercord
Codercord2w ago
<#1353752078425526282>
Category
Help needed
Product
code-server
Platform
Linux
Logs
Please post any relevant logs/error messages.
Roshan
RoshanOP2w ago
"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the daemon running"
Greenman999
Greenman9992w ago
https://discord.com/channels/747933592273027093/1336093480379748383 Probably the same problem as mine. You need to install sysbox
Phorcys
Phorcys2w ago
@Roshan ^ also, what happens when you run sudo dockerd?
Roshan
RoshanOP2w ago
Thanks guys, that issue is resolved. I have updated terraform template, under docker_container section I have added privileged = true and rebuild the workspace after that I can able to use docker. I'm facing below issue while doing networking with docker inside devcontainer: vscode ➜ /workspaces/hyperledger/fabric-samples/test-network (main) $ ./network.sh up Using docker and docker-compose Starting nodes with CLI timeout of '5' tries and CLI delay of '3' seconds and using database 'leveldb' LOCAL_VERSION=v2.5.12 DOCKER_IMAGE_VERSION=v2.5.12 WARN[0000] /workspaces/hyperledger/fabric-samples/test-network/compose/compose-test-net.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion WARN[0000] /workspaces/hyperledger/fabric-samples/test-network/compose/docker/docker-compose-test-net.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion [+] Running 0/3 ⠙ Container orderer.example.com Starting 0.1s ⠙ Container peer0.org1.example.com Starting 0.1s ⠙ Container peer0.org2.example.com Starting Error response from daemon: failed to set up container networking: driver failed programming external connectivity on endpoint peer0.org2.example.com (9ae407712bf7593a0a5e30386b0657d7c1e8d59b3f1aaf2055fb4843066ee72e): Unable to enable DIRECT ACCESS FILTERING - DROP rule: (iptables failed: iptables --wait -t raw -A PREROUTING -p tcp -d 172.19.0.2 --dport 9051 ! -i br-b4dfe5cceafd -j DROP: iptables v1.8.7 (legacy): unknown option "--dport" Try `iptables -h' or 'iptables --help' for more information. (exit status 2)) CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d9e3c248eaca hyperledger/fabric-peer:latest "peer node start" 11 hours ago Created peer0.org2.example.com 0dec3e86ca75 hyperledger/fabric-peer:latest "peer node start" 11 hours ago Created peer0.org1.example.com dedae73355a8 hyperledger/fabric-orderer:latest "orderer" 11 hours ago Created orderer.example.com
Phorcys
Phorcys7d ago
hey, while this does work, i would very well recommend installing sysbox instead running privileged containers is very unsafe
Phorcys
Phorcys7d ago
try switching to sysbox, it should fix that
Roshan
RoshanOP8h ago
I tried this, facing above issue
No description

Did you find this page helpful?