Docker not starting after setting iptables to false

I run server with ubuntu 17.04. I decided to try docker for my new project. I realized that docker does not play nicely with firewalls because it alters iptables on its own. So I browsed docker docs and found out that you can prevent that from happening by creating json file with flag like this:

/etc/docker/daemon.json

{
    "iptables": false
}

However after trying to restart the docker daemon I ran into an error:

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

More details:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2017-09-26 16:53:35 UTC; 1min 4s ago
     Docs: https://docs.docker.com
  Process: 2450 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 2450 (code=exited, status=1/FAILURE)
      CPU: 26ms

Sep 26 16:53:35 humblefund systemd[1]: docker.service: Main process exited, code=exited, status=1
Sep 26 16:53:35 humblefund systemd[1]: Failed to start Docker Application Container Engine.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Unit entered failed state.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Service hold-off time over, scheduling res
Sep 26 16:53:35 humblefund systemd[1]: Stopped Docker Application Container Engine.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Start request repeated too quickly.
Sep 26 16:53:35 humblefund systemd[1]: Failed to start Docker Application Container Engine.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Unit entered failed state.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Failed with result 'exit-code'.

The other output:

-- Support: http://www.ubuntu.com/support
-- 
-- Unit docker.socket has begun starting up.
Sep 26 16:53:35 humblefund systemd[1]: Listening on Docker Socket for the API.
-- Subject: Unit docker.socket has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit docker.socket has finished starting up.
-- 
-- The start-up result is done.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Start request repeated too quickly.
Sep 26 16:53:35 humblefund systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Sep 26 16:53:35 humblefund systemd[1]: docker.socket: Unit entered failed state.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Unit entered failed state.
Sep 26 16:53:35 humblefund systemd[1]: docker.service: Failed with result 'exit-code'.

Does anybody know how to fix this?

Is Docker starting fine when you enable IP tables?
There has been some change in the latest Docker regarding IP tables that interfere with bridge interface.

If docker comes up fine and you are facing problems in the bridge interface then do the following.

$ sudo sysctl net.bridge.bridge-nf-call-arptables=0
net.bridge.bridge-nf-call-arptables = 0
$ sudo sysctl net.bridge.bridge-nf-call-ip6tables=0
net.bridge.bridge-nf-call-ip6tables = 0
$ sudo sysctl net.bridge.bridge-nf-call-iptables=0
net.bridge.bridge-nf-call-iptables = 0

Or you could edit iptables rules.

to make the changes permanent add these in cron ( $sudo crontab -e)with @reboot entries

@reboot /bin/sleep 10 && /sbin/sysctl net.bridge.bridge-nf-call-arptables=0
@reboot /bin/sleep 11 && /sbin/sysctl net.bridge.bridge-nf-call-ip6tables=0
@reboot /bin/sleep 12 && /sbin/sysctl net.bridge.bridge-nf-call-iptables=0