Skip to content

dockerd cannot run inside the vagrant docker provider due to iptables #9

Description

@ckmorris

When provisioning the container on M1 in x86_64 mode, an error is received:

The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

service docker start

Stdout from the command:


Stderr from the command:

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

I jumped into the console and tried to run dockerd to see what the output was, and it was an issue with iptables being converted to nftables rather than legacy mode, and after updating iptables to use iptables-legacy:

update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy

A different error is encountered: iptables v1.8.7 (legacy): can't initialize iptables table 'nat': iptables who? (do you need to insmod?)

As a result, it is impossible to provision docker containers inside the machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions