-
Notifications
You must be signed in to change notification settings - Fork 877
Issue with DOCKER_REGISTRY_CONFIG var #332
Comments
Hello @consultantRR setup-configs.sh indeed is not aware of DOCKER_REGISTRY_CONFIG Anyhow, this is NOT your issue here. Rather, it's telling you that the environment variable CACHE_REDIS_PORT is not set - which means that you have set SETTINGS_FLAVOR to prod and using a copy of the sample file. Admittedly, this is a mess. Now, trying to solve your problem:
Please keep me updated on how it goes. Best. |
I believe this is fixed with the configuration cleanup at #350 that just got merged. You can expect a way better situation with the upcoming 0.7 version. I'm going to close this ticket, but feel free to comment here if you are still having issues with the current configuration mechanism. Best. |
Wow, this thread can be hard to follow. It sounds like you cannot set the configuration at all. |
@pmyjavec what is? |
@dmp42Well, It seems from what I'm experiencing and what you've said above this is pretty much unusable unless we use what is in the sample config right? I would love to be proven wrong right now. How does one possibly set the configuration if DOCKER_REGISTRY_CONFIG is ignored? I'm also having no luck at all setting environment variables either BTW. |
I don't think so.
Yes, you are wrong. Just use:
And disregard entirely what setup-configs.sh says, as it doesn't matter. Or run from master (which is pretty much 0.7, to be released in a matter of hours now), and disregard this ticket (and the others as well) entirely. If you still have issues (with either 0.6.x or 0.7 and need help), I would be glad to help indeed, but I would need something more specific than "wow this is absolutely stoopid" :-) Best. |
Updated my comment ;) Thanks for the help, will try again. |
Yes, the original poster (@consultantRR) thought his problem was with setup-config.sh, while it was not, which made this more confusing than needed.
DOCKER_REGISTRY_CONFIG is NOT ignored by the registry code. Whatever it points to WILL be used by the registry code: https://github.com/dotcloud/docker-registry/blob/0.6.9/docker_registry/lib/config.py#L58 DOCKER_REGISTRY_CONFIG IS ignored by the (legacy, broken, useless, and removed :-)) setup-config.sh script, though.
Ok, can you copy me (here or gist) the command line you use to launch the registry, and possibly the content of your config file? Hope that helps |
If I mount a config file into the docker image as exemplified in the README:
sudo docker run -p 5000:5000 -v /home/user/registry-conf:/registry-conf -e DOCKER_REGISTRY_CONFIG=/registry-conf/config.yml registry
...the run fails as follows:
./setup-configs.sh: line 14: config/config.yml: No such file or directory
** [Bugsnag] No API key configured, couldn't notify
Traceback (most recent call last):
File "/usr/local/bin/docker-registry", line 9, in
load_entry_point('docker-registry==0.6.8', 'console_scripts', 'docker-registry')()
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 351, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2363, in load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 2088, in load
File "/usr/local/lib/python2.7/dist-packages/docker_registry/init.py", line 16, in
from .app import app
File "/usr/local/lib/python2.7/dist-packages/docker_registry/app.py", line 12, in
from . import toolkit
File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 15, in
from . import storage
File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/init.py", line 133, in
from local import LocalStorage
File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/local.py", line 5, in
from ..lib import cache_lru
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/cache_lru.py", line 85, in
init()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/cache_lru.py", line 34, in init
port=int(redis_opts['port']),
ValueError: invalid literal for int() with base 10: '!ENV_NOT_FOUND'
Seems like ./setup-configs.sh isn't aware of DOCKER_REGISTRY_CONFIG?
The text was updated successfully, but these errors were encountered: