Skip to content
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

Can't access NextJS site within docker (localhost:3000) #168

Open
miwgel opened this issue Oct 2, 2024 · 1 comment
Open

Can't access NextJS site within docker (localhost:3000) #168

miwgel opened this issue Oct 2, 2024 · 1 comment

Comments

@miwgel
Copy link

miwgel commented Oct 2, 2024

Issue: Can't Access NextJS Site Within Docker (localhost:3000)

Description:

I am unable to access my NextJS application running inside a Docker container at localhost:3000. Here are the details:

  1. Container Status: I have checked that the Docker container is running using the command docker ps, and it shows that the container is active.

  2. Network Configuration: I suspect there might be an issue with the network configuration in Docker that is preventing access to localhost.

  3. Port Mapping: I have ensured that the port 3000 is correctly mapped in my docker-compose.yml file (or in the docker run command) with the line -p 3000:3000.

  4. Firewall/Security Settings: I have checked my firewall and security settings to ensure that they are not blocking access to port 3000.

  5. Logs: I have reviewed the container logs using docker logs <container_id>, but I did not find any errors that indicate why the application is not accessible.

I would appreciate any guidance on troubleshooting this issue further or any potential solutions to resolve the access problem.

@itripleg
Copy link

itripleg commented Jan 17, 2025

This was one of the first things I tried and it works for me. I mapped port 50002 to 3000 with network bridged and can access the app from my host computer (Windows11) browser at localhost:50002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants