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

Example of config.yml #20

Closed
ghost opened this issue Oct 16, 2018 · 4 comments
Closed

Example of config.yml #20

ghost opened this issue Oct 16, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2018

container won't start with only this command without its config.yml

docker run -d -p 8000:8000 -v /local/config.yml:/opt/config.yml:ro \
>     --name=registry-ui quiq/docker-registry-ui

I wonder where to find a sample for this image or howto write one?

To extend, what would it be to use token authentication?

@ghost
Copy link
Author

ghost commented Oct 17, 2018

Thanks, but I have docker_auth installed and work perfectly with dock registry and ldap but still can't run docker-registry-ui with base config, here is my config.yml:

# Listen interface.
listen_addr: 0.0.0.0:8000
# Base path of Docker Registry UI.
base_path: /

# Registry URL with schema and port.
registry_url: https://myregistry.com:5000
# Verify TLS certificate when using https.
verify_tls: true

# Docker registry credentials.
# They need to have a full access to the registry.
# If token authentication service is enabled, it will be auto-discovered and those credentials
# will be used to obtain access tokens.
# When the registry_password_file entry is used, the password can be passed as a docker secret 
# and read from file. This overides the registry_password entry.
registry_username: test
registry_password: 123456
# registry_password_file: /run/secrets/registry_password_file

# Event listener token.
# The same one should be configured on Docker registry as Authorization Bearer token.
event_listener_token: token
# Retention of records to keep.
event_retention_days: 7

# Event listener storage.
event_database_driver: sqlite3
event_database_location: data/registry_events.db
# event_database_driver: mysql
# event_database_location: user:password@tcp(localhost:3306)/docker_events

# Cache refresh interval in minutes.
# How long to cache repository list and tag counts.
cache_refresh_interval: 10

# If users can delete tags. If set to False, then only admins listed below.
anyone_can_delete: false
# Users allowed to delete tags.
# This should be sent via X-WEBAUTH-USER header from your proxy.
admins: [test1]

# Debug mode. Affects only templates.
debug: true

# How many days to keep tags but also keep the minimal count provided no matter how old.
purge_tags_keep_days: 90
purge_tags_keep_count: 2
# Enable built-in cron to schedule purging tags in server mode.
# Empty string disables this feature.
# Example: '25 54 17 * * *' will run it at 17:54:25 daily.
# Note, the cron schedule format includes seconds! See https://godoc.org/github.com/robfig/cron
purge_tags_schedule: ''

Basically, the only change is registry URL and user/pass to authen against token server, I use ssl on registry node so https.

Command that I run to invoke docker-registry-ui:

docker run -d -p 8000:8000 -v config.yml:/opt/config.yml:ro --name=registry-ui quiq/docker-registry-ui

just copy config.yml to home directory and modify some lines.
Problem is that I don't see registry-ui container in the output of docker ps, howto run it properly?

The container is created an immediately exit, no output when I invoke docker run <..>, I use archliux os that up-to-date.

@roman-vynar
Copy link
Contributor

Please paste the shell output of docker run on how you create container +
docker ps -a
docker logs registry-ui

There should be an error when a container is created in the first place or once started but you should see logs. What's docker version BTW?

@ghost
Copy link
Author

ghost commented Oct 17, 2018

Thanks with your help, I found out the issue:
I assumed /etc/hosts file wil be used by containers, turn out it's not, connections broke between containers.

After fix some url strings, it works as expected.

@ghost ghost closed this as completed Oct 17, 2018
This issue was closed.
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

1 participant