I need some help please. I am not sure what I am doing wrong. I have created a Wordpress image and container for a site I am building. When I do a docker-compose up -d the site comes up and i can access it. However when I run it as a container to test I get an error establishing a database connection.
Can anyone tell me what I may have done wrong or not added to my docker-compose.yml file. Could it be an environment variable issue?
I just need a nudge in the right direction. Any help will be appreciated.
So sorry, here is my docker-compose file. I am using a .env file for my variables. The issue occurs when i run this command: docker container run --publish 8000:80 --detach --name imagename:tag. I get the same message when i pull the image from Docker Hub into Azure Container Service when trying to publish my website.
Just to be sure: when you use image: wordpress:latest then this is the offical image from dockerhub and not a self created image that just happend to have the same tag as the official image?
Please provide the details of your .env file as well - only anonymize WORDPRESS_DB_PASSWORD.
I need to be able to see if all bits and pieces are “wired together correctly”.
Please provide ALL details required to get a full picture. If you realy did build your own image(s), provide the(ir) Dockerfile(s) and its entrypoint scripts.