0

The question is in the title, I am trying to dockerise a laravel app, and I start it with

php artisan serve --host=0.0.0.0 --port=8080

But then I try to access:

http://0.0.0.0:8080 

but it doesn't work

How should I access it ???

docker-compose.yml:

version: '3'
services:
  app:
    build: .
Juliatzin
  • 16,587
  • 31
  • 139
  • 282

1 Answers1

0

The reason this is not working is that you have not mapped the ports

Add below to the service which is exposing the 8080 port.

ports:
  - "8080:8080"

For more details please refer to the below link

https://docs.docker.com/compose/compose-file/

Tarun Lalwani
  • 133,941
  • 8
  • 173
  • 238