Skip to content

Commit

Permalink
Merge pull request #201 from olk-m/fix-docker-compose-port-for-rootle…
Browse files Browse the repository at this point in the history
…ss-docker

fix: use an unprivileged port for a server
  • Loading branch information
JWCook authored Nov 19, 2023
2 parents 8ccd180 + 3c8a4c0 commit 9ac436b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
nginx:
image: kennethreitz/httpbin
ports:
- 80:80
- 8080:80

steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ services:
image: kennethreitz/httpbin
container_name: httpbin
ports:
- '80:80'
# Use an unprivileged port to support running the Docker daemon as a non-root user (Rootless mode).
# See https://docs.docker.com/engine/security/rootless/#networking-errors
- ${HTTPBIN_CUSTOM_PORT:-8080}:80

httpbin-custom:
container_name: httpbin-custom
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def from_cache(*responses) -> bool:

def httpbin(path: str = ''):
"""Get the url for either a local or remote httpbin instance"""
base_url = getenv('HTTPBIN_URL', 'http://localhost:80/')
base_url = getenv('HTTPBIN_URL', 'http://localhost:8080/')
return base_url + path


Expand Down

0 comments on commit 9ac436b

Please sign in to comment.