项目作者: duyanghao

项目描述 :
Docker registry notification server that receives manifest events for search, migration and analysis.
高级语言: Go
项目地址: git://github.com/duyanghao/registry-notification-server.git
创建时间: 2016-04-14T09:48:47Z
项目社区:https://github.com/duyanghao/registry-notification-server

开源协议:Apache License 2.0

下载


registry-notification-server

registry-notification-server is a notification server of docker registry that receives manifest events and stores them in MongoDB for search, migration and analysis.

Overview

The Registry supports sending webhook notifications in response to events
happening within the registry. Notifications are sent in response to manifest
pushes and pulls and layer pushes and pulls. These actions are serialized into
events. The events are queued into a registry-internal broadcast system which
queues and dispatches events to Endpoints.
[…]
Notifications are sent to endpoints via HTTP requests.

registry-notification-server implements the above event notification protocol and provides some simple functions.

Prerequisites

This server assumes the following:

  • This notification server is designed for internal use, so it uses http instead of https, but still, it can be easily expanded to https using http.ListenAndServeTLS

Detail

The registry notification server listens for events coming from a docker registry v2, upon receiving an event, it inspects the event and inserts the pull or push records and repository informations into a Mongo database. The information stored in MongoDB support these functions:

  • Repository and Tag Search
  • Pull and Push Logs Search
  • Docker Registry Migration

Build the tool on your own

These instructions walk you through compiling this project to create a single standalone binary that you can copy and run almost wherever you want.

  1. $ git clone https://github.com/duyanghao/registry-notification-server.git $GOPATH/src/github.com/duyanghao/registry-notification-server
  2. $ cd $GOPATH/src/github.com/duyanghao/registry-notification-server && go build

Run

  1. ./registry-notification-server ./examples/config.yml

Suggestion

This is only a demo implemented as docker registry event notification endpoint, which still needs further enhancement.

Refs