How to include a docker image from a list of allowed images in CI/CD pipeline

I’m creating a CI/CD job to automate the building of new container images in gitlab. I’m using the default docker template for this reason, but I ran into this issue when executing the job.

In .gitlab-ci.yml I have the usual line:

docker-build:
  image: docker:latest
  services:
     - docker:dind

But based on the output I see that:

Please check runner's configuration:
        https://docs.gitlab.com/runner/configuration/advanced-configuration.html
        #restricting-docker-images-and-services
ERROR: Failed to remove network for build
ERROR: Preparation failed: disallowed image

This follows with a list of available images which I can use, and one has docker in its path, like this:

ERROR: The "docker:latest" image is not present on list of allowed images:
- azul/*:*
- buildpack-deps:*
....
- docker.s.com/**/*

I don’t understand, how do I use a docker image from the docker.s.com/**/* path above in .gitlab-ci.yml?