Docker Community Forums

Share and learn in the Docker community.

Docker-compose http://localhost:8000 not working

Hi

I am totally new to docker and try to install wordpress using following

docker config file docker-compose.yml

version: '3.3'                                                                                                                                                                                                                                  services:                                                                                                                  db:                                                                                                                       image: mysql:5.7                                                                                                        volumes:                                                                                                                  - db_data:/var/lib/mysql                                                                                              restart: always                                                                                                         environment:                                                                                                              MYSQL_ROOT_PASSWORD: root                                                                                               MYSQL_DATABASE: mysql                                                                                                   MYSQL_USER: admin                                                                                                       MYSQL_PASSWORD: admin                                                                                                                                                                                                                       wordpress:                                                                                                                depends_on:                                                                                                               - db                                                                                                                  image: wordpress:latest                                                                                                 ports:                                                                                                                    - "8000:80"                                                                                                           restart: always                                                                                                         environment:                                                                                                              WORDPRESS_DB_HOST: db:3306                                                                                              WORDPRESS_DB_USER: admin                                                                                                WORDPRESS_DB_PASSWORD: admin                                                                                            WORDPRESS_DB_NAME: admin                                                                                         volumes:                                                                                                                    db_data: {}            `Preformatted text`

it is working fine.

    $ docker-compose up -d
Starting wordpress_db_1 ... done                                                                                                                       Starting wordpress_wordpress_1 ... done 

But when i am typing http://localhost:8000 it is not working. Pl help me urgently

Thanks