projectatomic/rhel-push-plugin

Name: rhel-push-plugin

Owner: Project Atomic

Description: Blocks RHEL content push to docker.io

Created: 2016-03-07 20:27:27.0

Updated: 2017-11-07 00:15:58.0

Pushed: 2017-05-12 09:28:14.0

Homepage: null

Size: 605

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Block RHEL push to docker.io

In order to use this plugin you must be running at least Docker 1.10 which has support for authorization plugins.

This plugin avoids any RHEL based image to be pushed to the default docker.io registry preventing users to violate the RH subscription agreement.

Building
port GOPATH=~ # optional if you already have this
dir -p ~/src/github.com/projectatomic # optional, from now on I'm assuming GOPATH=~
 ~/src/github.com/projectatomic && git clone https://github.com/projectatomic/rhel-push-plugin
 rhel-push-plugin
ke
Installing
do make install
stemctl enable rhel-push-plugin
Running

Specify --authorization-plugin=rhel-push-plugin in the docker daemon command line flags (either in the systemd unit file or in /etc/sysconfig/docker in $OPTIONS or when manually starting the daemon). The plugin must be started before docker (done automatically via systemd unit file). If you're not using the systemd unit file:

el-push-plugin &

Just restart docker and you're good to go!

Systemd socket activation

The plugin can be socket activated by systemd. You just have to basically use the file provided under systemd/ (or installing via make install). This ensures the plugin gets activated if it goes down for any reason.

How to test

Given the plugin is enabled and myregistry.com:5000 can be used as a test registry:

Note: when pushing without a tag a check is performed on any image matching the image name provided. If any of the images is RHEL based the plugin errors out and you should directly push with a tag.

License

GPLv2


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.