Localhost with Flutter web not working with docker

I just added --web-hostname 0.0.0.0 to end of the docker-compose.yml command and it works. But instead of localhost:8080 now is 0.0.0.0:8080.

So the docker-compose.yml looks like this:

version: '3.1'
services:
    dashboard:
        build: .
        restart: always
        ports:
            - "8080:8080"
        command: >
            sh -c "flutter pub get && flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0"

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top