You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
The README assumes you want to run it on port 5000, but say I want to run it on port 80? There appears to be no setting in the config.yml file for this. I searched for where the server starts listening for connections but it looks like there are at least 3 different places which try to configure this and it's quite confusing:
docker_registry/wsgi.py
looks like this file says you can set a PORT_WWW environment variable defaulting to 5000, but this is only if you run this file directly from the command line, so this must not be what the Docker container uses when it starts.
config/gunicorn_config.py
I'm not sure how you start the server using this config file, but it uses PORT_WWW as well, but defaults to 8000 instead, wut?
docker_registry/__init__.py
Starting from the Dockerfile, it looks like we pip install the /docker_registry/ directory. The setup.py file specifies docker-registry as a console script which runs docker_registry:run_gunicorn. Reading docker_registry/__init__.py it uses REGISTRY_PORT and defaults to 5000. It also does os.execl on the gunicorn executable path and specifies a bunch of command line options. Why not just specify the config/gunicorn_config.py module instead?
In conclusion, it looks like REGISTRY_PORT is the correct environment variable to use to change the server port. Let's make that more obvious, clean, and consistent.
The text was updated successfully, but these errors were encountered:
On Fri, May 16, 2014 at 04:00:59PM -0700, Sam Alba wrote:
I think it's just to avoid keeping a sh child process...
Yup, see c170cc5 (Use exec to eliminate extra shell processes,
2014-03-01).
Maybe docker should do that directly.
You can do that with ENTRYPOINT, but I prefer 'CMD exec …' when
/bin/sh exists because it makes it easier to launch an interactive
session when you want to poke things before launching the registry.
The README assumes you want to run it on port 5000, but say I want to run it on port 80? There appears to be no setting in the config.yml file for this. I searched for where the server starts listening for connections but it looks like there are at least 3 different places which try to configure this and it's quite confusing:
docker_registry/wsgi.py
looks like this file says you can set a
PORT_WWW
environment variable defaulting to5000
, but this is only if you run this file directly from the command line, so this must not be what the Docker container uses when it starts.config/gunicorn_config.py
I'm not sure how you start the server using this config file, but it uses
PORT_WWW
as well, but defaults to8000
instead, wut?docker_registry/__init__.py
Starting from the Dockerfile, it looks like we pip install the
/docker_registry/
directory. Thesetup.py
file specifiesdocker-registry
as a console script which runsdocker_registry:run_gunicorn
. Readingdocker_registry/__init__.py
it usesREGISTRY_PORT
and defaults to5000
. It also doesos.execl
on thegunicorn
executable path and specifies a bunch of command line options. Why not just specify theconfig/gunicorn_config.py
module instead?In conclusion, it looks like
REGISTRY_PORT
is the correct environment variable to use to change the server port. Let's make that more obvious, clean, and consistent.The text was updated successfully, but these errors were encountered: