Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build the containers when the awx_devel image has already been pulled from a private repository #15633

Closed
5 of 11 tasks
jean-christophe-manciot opened this issue Nov 13, 2024 · 2 comments

Comments

@jean-christophe-manciot
Copy link

jean-christophe-manciot commented Nov 13, 2024

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

  1. make docker-compose-build is replaced by a docker pull ${private_registry_fqdn}:${port}/awx_devel:${awx_devel_version}.
  2. make docker-compose tries to pull the awx_devel image although it has already been pulled in the previous step, resulting in an error message pull access denied for awx_devel.

AWX version

24.6.1

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

docker development environment

Modifications

yes

Ansible version

2.17.6

Operating system

Ubuntu 24.04

Web browser

No response

Steps to reproduce

git clone -b 24.6.1 https://github.com/ansible/awx.git git-awx && cd git-awx
git checkout -b $awx_devel_version 24.6.1
docker pull ${private_registry_fqdn}:${port}/awx_devel:${awx_devel_version}
export RECEPTOR_IMAGE=quay.io/ansible/receptor:v1.4.9
export COMPOSE_TAG=${awx_devel_version}
export DEVEL_IMAGE_NAME=awx_devel:${awx_devel_version}
sed -i '/^[[:blank:]]*DEV_DOCKER_TAG_BASE[[:blank:]]*?=[[:blank:]]*ghcr.io.*/d' Makefile
sed -Ei 's|^[[:blank:]]*DEVEL_IMAGE_NAME[[:blank:]]*\?=.*|DEVEL_IMAGE_NAME ?= awx_devel:$(COMPOSE_TAG)|g' Makefile
sed -Ei 's|^([[:blank:]]*-e[[:blank:]]+awx_image[[:blank:]]*=[[:blank:]]*)\$\(DEV_DOCKER_TAG_BASE\)/awx_devel[[:blank:]]*\\|\1awx_devel \\|g' Makefile
make docker-compose 

Expected results

Built & started AWX tools_* containers

Actual results

ansible-playbook -e ansible_python_interpreter=python3.11 -i tools/docker-compose/inventory tools/docker-compose/ansible/sources.yml \
    -e awx_image=awx_devel \
    -e awx_image_tag=<awx_devel_version> \
    -e receptor_image=quay.io/ansible/receptor:v1.4.9 \
    -e control_plane_node_count=1 \
    -e execution_node_count=0 \
    -e minikube_container_group=false \
    -e enable_pgbouncer=false \
    -e enable_keycloak=false \
    -e enable_ldap=false \
    -e enable_splunk=false \
    -e enable_prometheus=false \
    -e enable_grafana=false \
    -e enable_vault=false \
    -e vault_tls=false \
    -e enable_tacacs=false \
    -e enable_otel=false \
    -e enable_loki=false \
    -e install_editable_dependencies=false \
    -e pg_tls=false \
    
...

ansible-playbook -e ansible_python_interpreter=python3.11 -i tools/docker-compose/inventory tools/docker-compose/ansible/initialize_containers.yml \
    -e enable_vault=false \
    -e vault_tls=false \
    -e enable_ldap=false; \
make docker-compose-up

...

docker compose -f tools/docker-compose/_sources/docker-compose.yml  up  --remove-orphans
...
[+] Running 3/3
 ✘ postgres Error context canceled                                                                                                                       1.2s 
 ✘ redis_1 Error  context canceled                                                                                                                       1.2s 
 ✘ awx_1 Error    pull access denied for awx_devel, repository does not exist or may require 'docker login': denied: requested access to...              1.2s 
Error response from daemon: pull access denied for awx_devel, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

Additional information

As shown in the Steps to reproduce, the Makefile has been modified.
The modifications are probably incomplete.
What should be done to allow this workflow?

@jean-christophe-manciot
Copy link
Author

docker images
REPOSITORY                                TAG             IMAGE ID       CREATED       SIZE
<private_registry_fqdn>/awx_devel   <awx_devel_version>   3c83182c77ea   3 hours ago   2.11GB

@jean-christophe-manciot
Copy link
Author

The solution is much simpler; there is no need to modify the makefile; it is enough to set the env variable DEV_DOCKER_TAG_BASE=<private_registry_fqdn>, alongside the COMPOSE_TAG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant