In my project (standard devops build) - nginx and php depend on the cli image as below:
cli:
build:
context: .
dockerfile: .docker/cli.dockerfile
args:
WEBROOT: "${DREVOPS_WEBROOT:-web}"
GITHUB_TOKEN: "${GITHUB_TOKEN:-}"
image: &cli-image ${COMPOSE_PROJECT_NAME:-example_site}
<<: *default-volumes
user: root
environment:
<<: *default-environment
# Mount volumes from the ssh-agent running in Pygmy to inject host SSH key into container. See https://pygmy.readthedocs.io/en/master/ssh_agent/
volumes_from: ### Local overrides to mount host SSH keys. Automatically removed in CI.
- container:amazeeio-ssh-agent ### Local overrides to mount host SSH keys. Automatically removed in CI.
ports:
- "35729" # Livereload port in container. Find port on host with `ahoy info` or `docker compose port cli 35729`.
nginx:
build:
context: .
dockerfile: .docker/nginx-drupal.dockerfile
args:
CLI_IMAGE: *cli-image
WEBROOT: "${DREVOPS_WEBROOT:-web}"
<<: [*default-volumes, *default-user]
environment:
<<: *default-environment
depends_on:
- cli
networks:
- amazeeio-network # This network is supported by Pygmy and used to route all requests to host machine.
- default # This is a standard network and is used for all other environments, where requests routing is not required and/or not supported.
CLI builds successfully and exports the image correctly such that I can see the image and name i expect with the command docker images | grep 'project_name' and I can see the tag correctly showing when I run the command docker inspect <project_name>:latest
But, I get the following error when building the containers that depend on this image:
=> ERROR [nginx internal] load metadata for docker.io/library/<project_name>:latest 0.8s
=> [php internal] load build definition from php.dockerfile 0.0s
=> => transferring dockerfile: 485B 0.0s
=> CANCELED [php internal] load metadata for docker.io/uselagoon/php-8.1-fpm:23.11.0 0.8s
=> [php auth] uselagoon/php-8.1-fpm:pull token for registry-1.docker.io 0.0s
=> [nginx auth] library/migrator:pull token for registry-1.docker.io 0.0s
------
> [nginx internal] load metadata for docker.io/library/<project_name>:latest:
------
It is trying to load from docker.io which is done when the image is not present on the local system. It could well be a docker bug with a recent update.
No action just putting it here in case anyone else encounters.
In my project (standard devops build) - nginx and php depend on the cli image as below:
CLI builds successfully and exports the image correctly such that I can see the image and name i expect with the command
docker images | grep 'project_name'
and I can see the tag correctly showing when I run the commanddocker inspect <project_name>:latest
But, I get the following error when building the containers that depend on this image:
It is trying to load from docker.io which is done when the image is not present on the local system. It could well be a docker bug with a recent update.
No action just putting it here in case anyone else encounters.