Skip to content

Web app not accesible through docker/podman #2003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 tasks done
7677865466 opened this issue Jan 29, 2025 · 3 comments
Open
3 tasks done

Web app not accesible through docker/podman #2003

7677865466 opened this issue Jan 29, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@7677865466
Copy link

Checklist

  • I'm reporting a bug in Maigret functionality
  • I've checked for similar bug reports including closed ones
  • I've checked for pull requests that attempt to fix this bug

Description

Info about Maigret version you are running and environment (--version, operation system, ISP provider):
I am running the docker container (through podman)
maigret 0.5.0a1
Socid-extractor: 0.0.27
Aiohttp: 3.11.11
Requests: 2.32.3
Python: 3.10.16

How to reproduce this bug (commandline options / conditions):
podman run -d -p 5000:5000 docker.io/soxoj/maigret:latest --verbose --web 5000

The web app is not accessible from the host port.
@7677865466 7677865466 added the bug Something isn't working label Jan 29, 2025
@ctison
Copy link

ctison commented Mar 30, 2025

Quick fix to run inside container:

sed -i 's|app\.run(|app.run(host="0.0.0.0",|' /usr/local/lib/python3.10/site-packages/maigret/maigret.py

@7677865466
Copy link
Author

Quick fix to run inside container:

sed -i 's|app.run(|app.run(host="0.0.0.0",|' /usr/local/lib/python3.10/site-packages/maigret/maigret.py
Thank you!

By adding your oneliner to my podman quadlet as entrypoint I managed to make it permanent for now. For reference:

[Container]
ContainerName=maigret
Image=docker.io/soxoj/maigret:latest
AutoUpdate=registry
Entrypoint=["/bin/sh", "-c", "sed -i 's|app\\.run(|app.run(host=\"0.0.0.0\",|' /usr/local/lib/python3.10/site-packages/maigret/maigret.py && maigret --web 5005"]
PublishPort=5005:5005

@Loak4156
Copy link

docker run --name maigret-webapp -p 8006:5000 --entrypoint /bin/sh soxoj/maigret -c "sed -i 's|app\.run(|app.run(host="0.0.0.0",|' /usr/local/lib/python3.10/site-packages/maigret/maigret.py && maigret --web 5000"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants