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

dotnetuser 80 port Permission denied #5

Closed
dyw770 opened this issue Aug 8, 2024 · 8 comments
Closed

dotnetuser 80 port Permission denied #5

dyw770 opened this issue Aug 8, 2024 · 8 comments

Comments

@dyw770
Copy link
Contributor

dyw770 commented Aug 8, 2024

dotnetuser user does not have permission to listen on port 80.
image
temporary solution:

 identity-server:
    image: streetwriters/identity:latest
    user: "root:root"
    ports:
      - 8264:80
    networks:
      - notesnook
    env_file: *env-files
@thecodrr
Copy link
Contributor

thecodrr commented Aug 8, 2024

Are you running docker as root?

@dyw770
Copy link
Contributor Author

dyw770 commented Aug 9, 2024

Docker runs as root user. The dotnetuser user in the container does not have permission to listen on port 80 in the container. When I run the streetwriters/identity container as root, everything becomes normal.

@thecodrr
Copy link
Contributor

thecodrr commented Aug 9, 2024

Hmmm. I think the container can listen on a different port than 80 to bypass this.

@dyw770
Copy link
Contributor Author

dyw770 commented Aug 9, 2024

My English is not good, I don't know if my expression is correct
This issue is because dotnetuser does not have permission to listen on port 80 inside the container, and we cannot modify the port that the program listens on inside the container, which is determined by the image you packaged

@dyw770
Copy link
Contributor Author

dyw770 commented Aug 9, 2024

image

@thecodrr
Copy link
Contributor

thecodrr commented Aug 9, 2024

Fixed now in the latest docker-compose.yml.

@thecodrr thecodrr closed this as completed Aug 9, 2024
@thecodrr
Copy link
Contributor

thecodrr commented Aug 9, 2024

The exposed port can easily be changed via the docker-compose.yml file

@dyw770
Copy link
Contributor Author

dyw770 commented Aug 9, 2024

Got it, I didn't understand the purpose of the environment configuration above. Thank you

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