Sometimes the first command after starting the Docker daemon container fails, presumably because the container did not start yet. Wait until the Docker daemon is ready.