requests-cache / aiohttp-client-cache

An async persistent cache for aiohttp requests
MIT License
122 stars 22 forks source link

fix: use an unprivileged port for a server #201

Closed alessio-locatelli closed 1 year ago

alessio-locatelli commented 1 year ago

Problem

See https://docs.docker.com/engine/security/rootless/#networking-errors

When running the Docker daemon as a non-root user (Rootless mode), executing docker compose up will give an error similar to

cannot expose privileged port 80

Solution

There are multiple ways to solve this. All are mentioned in the official Docker docs, see the link above.

On my opinion, the simplest non-breaking solution is to use a non-privileged port by default.

Additionally, the current solution even extends developer's possibilities: a developer can specify a custom port via HTTPBIN_CUSTOM_PORT environment variable before running docker compose up.

Breaking changes

No.

Are end-users affected?

No.

JWCook commented 1 year ago

Good call. Thanks!