Search code examples
dockerdocker-composeansiblehostansible-awx

How to install AWX successfully with docker-compose if reinstall it again?


The first time installed it succeeded. But reinstall it again, always failed.


Use docker-compose install AWX

ansible-playbook -i inventory install.yml

Error

TASK [local_docker : Start the containers] *******************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "errors": [], "module_stderr": "Creating awx_postgres ... \nCreating awx_memcached ... \nCreating awx_redis     ... \n\u001b[2A\u001b[2K\nCreating awx_memcached ... \n\u001b[2B\u001b[3A\u001b[2K\nCreating awx_postgres  ... \n\u001b[3B\u001b[1A\u001b[2K\nCreating awx_redis     ... \n\u001b[1BCreating awx_web       ... \nHost is already in use by another container\n\u001b[1A\u001b[2K\nCreating awx_web       ... \n\u001b[1B", "module_stdout": "", "msg": "Error starting project Encountered errors while bringing up the project."}

I deleted all the posible resources

cd ~/.awx/awxcompose
docker-compose down

docker network prune
docker volume prune
docker container prune
docker image prune

Install it again still got the same error.


Solution

  • List all running containers and find yours

    Docker ps
    

    Remove it

    Docker rm -f container_id
    

    Start it again (docker run ..., or use your docker-compose)