docker 私有registry 本地安装没有成功,gunicorn这个命令有问题,注:docker镜像实现registry已经实现。Docker-Registry is a simple Python app, installing it is straight-forward:
git clone https://github.com/dotcloud/docker-registry.git
cd docker-registry
cp config_sample.yml config.yml
pip install -r requirements.txt
gunicorn --access-logfile - --log-level debug --debug  -b 0.0.0.0:5000 -w 1 wsgi:application(这一步有问题)

解决方案 »

  1.   

    下面是错误代码:
    root@docker-K42Jr:/home/gzu/docker-registry/requirements# gunicorn --access-logfile - --log-level debug --debug -b 0.0.0.0:5000 -w 1 wsgi:application
    usage: gunicorn [OPTIONS] [APP_MODULE]
    gunicorn: error: unrecognized arguments: --debug
    root@docker-K42Jr:/home/gzu/docker-registry/requirements# gunicorn --access-logfile - --log-level --debug -b 0.0.0.0:5000 -w 1 wsgi:application
    usage: gunicorn [OPTIONS] [APP_MODULE]
    gunicorn: error: argument --log-level: expected one argument
      

  2.   

    root@docker-K42Jr:/home/gzu/docker-registry/requirements# gunicorn --access-logfile - --log-level debug -b 0.0.0.0:5000 -w 1 wsgi:application
    [2014-12-07 22:24:06 +0000] [6307] [DEBUG] Current configuration:
      proxy_protocol: False
      worker_connections: 1000
      statsd_host: None
      max_requests_jitter: 0
      post_fork: <function post_fork at 0x7f7e81905f50>
      pythonpath: None
      syslog: False
      enable_stdio_inheritance: False
      worker_class: sync
      ssl_version: 3
      suppress_ragged_eofs: True
      syslog_facility: user
      statsd_prefix: 
      when_ready: <function when_ready at 0x7f7e81905c80>
      pre_fork: <function pre_fork at 0x7f7e81905de8>
      cert_reqs: 0
      preload_app: False
      workers: 1
      keepalive: 2
      accesslog: -
      sendfile: True
      worker_tmp_dir: None
      group: 0
      graceful_timeout: 30
      spew: False
      proc_name: None
      umask: 0
      on_reload: <function on_reload at 0x7f7e81905b18>
      post_worker_init: <function post_worker_init at 0x7f7e8190c140>
      pre_exec: <function pre_exec at 0x7f7e8190c578>
      limit_request_fields: 100
      on_exit: <function on_exit at 0x7f7e8190cc08>
      config: None
      logconfig: None
      pidfile: None
      check_config: False
      do_handshake_on_connect: False
      secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
      proxy_allow_ips: ['127.0.0.1']
      pre_request: <function pre_request at 0x7f7e8190c6e0>
      post_request: <function post_request at 0x7f7e8190c7d0>
      user: 0
      forwarded_allow_ips: ['127.0.0.1']
      worker_int: <function worker_int at 0x7f7e8190c2a8>
      threads: 1
      max_requests: 0
      limit_request_line: 4094
      access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
      certfile: None
      worker_exit: <function worker_exit at 0x7f7e8190c938>
      chdir: /home/gzu/docker-registry/requirements
      paste: None
      default_proc_name: wsgi:application
      errorlog: -
      loglevel: debug
      syslog_addr: udp://localhost:514
      syslog_prefix: None
      daemon: False
      ciphers: TLSv1
      on_starting: <function on_starting at 0x7f7e819059b0>
      worker_abort: <function worker_abort at 0x7f7e8190c410>
      bind: ['0.0.0.0:5000']
      raw_env: []
      reload: False
      limit_request_field_size: 8190
      nworkers_changed: <function nworkers_changed at 0x7f7e8190caa0>
      timeout: 30
      ca_certs: None
      django_settings: None
      tmp_upload_dir: None
      keyfile: None
      backlog: 2048
      logger_class: gunicorn.glogging.Logger
    [2014-12-07 22:24:06 +0000] [6307] [INFO] Starting gunicorn 19.2.0
    [2014-12-07 22:24:06 +0000] [6307] [DEBUG] Arbiter booted
    [2014-12-07 22:24:06 +0000] [6307] [INFO] Listening at: http://0.0.0.0:5000 (6307)
    [2014-12-07 22:24:06 +0000] [6307] [INFO] Using worker: sync
    [2014-12-07 22:24:06 +0000] [6312] [INFO] Booting worker with pid: 6312
    [2014-12-07 22:24:06 +0000] [6307] [DEBUG] 1 workers
    [2014-12-07 22:24:06 +0000] [6312] [ERROR] Exception in worker process:
    Traceback (most recent call last):
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 517, in spawn_worker
        worker.init_process()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/workers/base.py", line 117, in init_process
        self.wsgi = self.app.wsgi()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 65, in load
        return self.load_wsgiapp()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/util.py", line 355, in import_app
        __import__(module)
    ImportError: No module named wsgi
    Traceback (most recent call last):
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 517, in spawn_worker
        worker.init_process()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/workers/base.py", line 117, in init_process
        self.wsgi = self.app.wsgi()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 65, in load
        return self.load_wsgiapp()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/util.py", line 355, in import_app
        __import__(module)
    ImportError: No module named wsgi
    [2014-12-07 22:24:06 +0000] [6312] [INFO] Worker exiting (pid: 6312)
    [2014-12-07 22:24:06 +0000] [6307] [INFO] Shutting down: Master
    [2014-12-07 22:24:06 +0000] [6307] [INFO] Reason: Worker failed to boot.
    root@docker-K42Jr:/home/gzu/docker-registry/requirements# gunicorn --access-logfile - --log-level debug -b 0.0.0.0:5000 -w 1 wsgi:application
    [2014-12-07 22:31:48 +0000] [7546] [DEBUG] Current configuration:
      proxy_protocol: False
      worker_connections: 1000
      statsd_host: None
      max_requests_jitter: 0
      post_fork: <function post_fork at 0x7f0679283f50>
      pythonpath: None
      syslog: False
      enable_stdio_inheritance: False
      worker_class: sync
      ssl_version: 3
      suppress_ragged_eofs: True
      syslog_facility: user
      statsd_prefix: 
      when_ready: <function when_ready at 0x7f0679283c80>
      pre_fork: <function pre_fork at 0x7f0679283de8>
      cert_reqs: 0
      preload_app: False
      workers: 1
      keepalive: 2
      accesslog: -
      sendfile: True
      worker_tmp_dir: None
      group: 0
      graceful_timeout: 30
      spew: False
      proc_name: None
      umask: 0
      on_reload: <function on_reload at 0x7f0679283b18>
      post_worker_init: <function post_worker_init at 0x7f067928a140>
      pre_exec: <function pre_exec at 0x7f067928a578>
      limit_request_fields: 100
      on_exit: <function on_exit at 0x7f067928ac08>
      config: None
      logconfig: None
      pidfile: None
      check_config: False
      do_handshake_on_connect: False
      secure_scheme_headers: {'X-FORWARDED-PROTOCOL': 'ssl', 'X-FORWARDED-PROTO': 'https', 'X-FORWARDED-SSL': 'on'}
      proxy_allow_ips: ['127.0.0.1']
      pre_request: <function pre_request at 0x7f067928a6e0>
      post_request: <function post_request at 0x7f067928a7d0>
      user: 0
      forwarded_allow_ips: ['127.0.0.1']
      worker_int: <function worker_int at 0x7f067928a2a8>
      threads: 1
      max_requests: 0
      limit_request_line: 4094
      access_log_format: %(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"
      certfile: None
      worker_exit: <function worker_exit at 0x7f067928a938>
      chdir: /home/gzu/docker-registry/requirements
      paste: None
      default_proc_name: wsgi:application
      errorlog: -
      loglevel: debug
      syslog_addr: udp://localhost:514
      syslog_prefix: None
      daemon: False
      ciphers: TLSv1
      on_starting: <function on_starting at 0x7f06792839b0>
      worker_abort: <function worker_abort at 0x7f067928a410>
      bind: ['0.0.0.0:5000']
      raw_env: []
      reload: False
      limit_request_field_size: 8190
      nworkers_changed: <function nworkers_changed at 0x7f067928aaa0>
      timeout: 30
      ca_certs: None
      django_settings: None
      tmp_upload_dir: None
      keyfile: None
      backlog: 2048
      logger_class: gunicorn.glogging.Logger
    [2014-12-07 22:31:48 +0000] [7546] [INFO] Starting gunicorn 19.2.0
    [2014-12-07 22:31:48 +0000] [7546] [DEBUG] Arbiter booted
    [2014-12-07 22:31:48 +0000] [7546] [INFO] Listening at: http://0.0.0.0:5000 (7546)
    [2014-12-07 22:31:48 +0000] [7546] [INFO] Using worker: sync
    [2014-12-07 22:31:48 +0000] [7551] [INFO] Booting worker with pid: 7551
    [2014-12-07 22:31:48 +0000] [7551] [ERROR] Exception in worker process:
    Traceback (most recent call last):
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 517, in spawn_worker
        worker.init_process()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/workers/base.py", line 117, in init_process
        self.wsgi = self.app.wsgi()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 65, in load
        return self.load_wsgiapp()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/util.py", line 355, in import_app
        __import__(module)
    ImportError: No module named wsgi
    Traceback (most recent call last):
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 517, in spawn_worker
        worker.init_process()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/workers/base.py", line 117, in init_process
        self.wsgi = self.app.wsgi()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 67, in wsgi
        self.callable = self.load()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 65, in load
        return self.load_wsgiapp()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
        return util.import_app(self.app_uri)
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/util.py", line 355, in import_app
        __import__(module)
    ImportError: No module named wsgi
    [2014-12-07 22:31:48 +0000] [7551] [INFO] Worker exiting (pid: 7551)
      

  3.   

    Traceback (most recent call last):
      File "/usr/local/bin/gunicorn", line 9, in <module>
        load_entry_point('gunicorn==19.2.0', 'console_scripts', 'gunicorn')()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/wsgiapp.py", line 74, in run
        WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 189, in run
        super(Application, self).run()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/app/base.py", line 72, in run
        Arbiter(self).run()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 170, in run
        self.manage_workers()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 487, in manage_workers
        self.spawn_workers()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 551, in spawn_workers
        time.sleep(0.1 * random.random())
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 210, in handle_chld
        self.reap_workers()
      File "/home/gzu/docker-registry/src/gunicorn/gunicorn/arbiter.py", line 469, in reap_workers
        raise HaltServer(reason, self.WORKER_BOOT_ERROR)
    gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>