Check if image is set with docker provider

If build_dir is set instead for building images on demand, there's no way to
know what to set the bucket name to, except perhaps parsing it from Dockerfile.