reg

授权协议 MIT License
开发语言 JavaScript
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 须旭
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

reg

Docker registry v2 command line client and repo listing generator with security checks.

Table of Contents

Installation

Binaries

For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/genuinetools/reg

Usage

$ reg -h
reg -  Docker registry v2 client.

Usage: reg <command>

Flags:

  --auth-url           alternate URL for registry authentication (ex. auth.docker.io) (default: <none>)
  -d                   enable debug logging (default: false)
  -f, --force-non-ssl  force allow use of non-ssl (default: false)
  -k, --insecure       do not verify tls certificates (default: false)
  -p, --password       password for the registry (default: <none>)
  --skip-ping          skip pinging the registry while establishing connection (default: false)
  --timeout            timeout for HTTP requests (default: 1m0s)
  -u, --username       username for the registry (default: <none>)

Commands:

  digest    Get the digest for a repository.
  layer     Download a layer for a repository.
  ls        List all repositories.
  manifest  Get the json manifest for a repository.
  rm        Delete a specific reference of a repository.
  server    Run a static UI server for a registry.
  tags      Get the tags for a repository.
  vulns     Get a vulnerability report for a repository from a CoreOS Clair server.
  version   Show the version information.

NOTE: Be aware that reg ls doesn't work with hub.docker.com as it has a different API than the OSS Docker Registry.

Auth

reg will automatically try to parse your docker config credentials, but ifnot present, you can pass through flags directly.

List Repositories and Tags

Repositories

# this command might take a while if you have hundreds of images like I do
$ reg ls r.j3ss.co
Repositories for r.j3ss.co
REPO                  TAGS
awscli                latest
beeswithmachineguns   latest
camlistore            latest
chrome                beta, latest, stable
...

Tags

$ reg tags r.j3ss.co/tor-browser
alpha
hardened
latest
stable

# or for an offical image
$ reg tags debian
6
6.0
6.0.10
6.0.8
6.0.9
7
7-slim
7.10
7.11
7.11-slim
...

Get a Manifest

$ reg manifest r.j3ss.co/htop
{
   "schemaVersion": 1,
   "name": "htop",
   "tag": "latest",
   "architecture": "amd64",
   "fsLayers": [
     {
       "blobSum": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
     },
     ....
   ],
   "history": [
     ....
   ]
 }

Get the Digest

$ reg digest r.j3ss.co/htop
sha256:791158756cc0f5b27ef8c5c546284568fc9b7f4cf1429fb736aff3ee2d2e340f

Download a Layer

$ reg layer -o r.j3ss.co/chrome@sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
OR
$ reg layer r.j3ss.co/chrome@sha256:a3ed95caeb0.. > layer.tar

Delete an Image

$ reg rm r.j3ss.co/chrome@sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4
Deleted chrome@sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4

Vulnerability Reports

$ reg vulns --clair https://clair.j3ss.co r.j3ss.co/chrome
Found 32 vulnerabilities
CVE-2015-5180: [Low]

https://security-tracker.debian.org/tracker/CVE-2015-5180
-----------------------------------------
CVE-2016-9401: [Low]
popd in bash might allow local users to bypass the restricted shell and cause a use-after-free via a crafted address.
https://security-tracker.debian.org/tracker/CVE-2016-9401
-----------------------------------------
CVE-2016-3189: [Low]
Use-after-free vulnerability in bzip2recover in bzip2 1.0.6 allows remote attackers to cause a denial of service (crash) via a crafted bzip2 file, related to block ends set to before the start of the block.
https://security-tracker.debian.org/tracker/CVE-2016-3189
-----------------------------------------
CVE-2011-3389: [Medium]
The SSL protocol, as used in certain configurations in Microsoft Windows and Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, Opera, and other products, encrypts data by using CBC mode with chained initialization vectors, which allows man-in-the-middle attackers to obtain plaintext HTTP headers via a blockwise chosen-boundary attack (BCBA) on an HTTPS session, in conjunction with JavaScript code that uses (1) the HTML5 WebSocket API, (2) the Java URLConnection API, or (3) the Silverlight WebClient API, aka a "BEAST" attack.
https://security-tracker.debian.org/tracker/CVE-2011-3389
-----------------------------------------
CVE-2016-5318: [Medium]
Stack-based buffer overflow in the _TIFFVGetField function in libtiff 4.0.6 and earlier allows remote attackers to crash the application via a crafted tiff.
https://security-tracker.debian.org/tracker/CVE-2016-5318
-----------------------------------------
CVE-2016-9318: [Medium]
libxml2 2.9.4 and earlier, as used in XMLSec 1.2.23 and earlier and other products, does not offer a flag directly indicating that the current document may be read but other files may not be opened, which makes it easier for remote attackers to conduct XML External Entity (XXE) attacks via a crafted document.
https://security-tracker.debian.org/tracker/CVE-2016-9318
-----------------------------------------
CVE-2015-7554: [High]
The _TIFFVGetField function in tif_dir.c in libtiff 4.0.6 allows attackers to cause a denial of service (invalid memory write and crash) or possibly have unspecified other impact via crafted field data in an extension tag in a TIFF image.
https://security-tracker.debian.org/tracker/CVE-2015-7554
-----------------------------------------
Unknown: 2
Negligible: 23
Low: 3
Medium: 3
High: 1

Generating Static Website for a Registry

reg bundles a HTTP server that periodically generates a static websitewith a list of registry images and serves it to the web.

It will run vulnerability scanning if youhave a CoreOS Clair server set upand pass the url with the --clair flag.

It is possible to run reg server just as a one time static generator.--once flag makes the server command exit after it builds the HTML listing.

There is a demo at r.j3ss.co.

Usage:

$ reg server -h
Usage: reg server [OPTIONS]

Run a static UI server for a registry.

Flags:

  -u, --username       username for the registry (default: <none>)
  --listen-address     address to listen on (default: <none>)
  --asset-path         Path to assets and templates (default: <none>)
  -f, --force-non-ssl  force allow use of non-ssl (default: false)
  --once               generate the templates once and then exit (default: false)
  --skip-ping          skip pinging the registry while establishing connection (default: false)
  --timeout            timeout for HTTP requests (default: 1m0s)
  --cert               path to ssl cert (default: <none>)
  -d                   enable debug logging (default: false)
  --key                path to ssl key (default: <none>)
  --port               port for server to run on (default: 8080)
  -r, --registry       URL to the private registry (ex. r.j3ss.co) (default: <none>)
  --clair              url to clair instance (default: <none>)
  -k, --insecure       do not verify tls certificates (default: false)
  --interval           interval to generate new index.html's at (default: 1h0m0s)
  -p, --password       password for the registry (default: <none>)

Screenshots:

Using Self-Signed Certs with a Registry

We do not allow users to pass all the custom certificate flags on commandsbecause it is unnecessarily messy and can be handled through Linux itself.Which we believe is a better user experience than having to pass threedifferent flags just to communicate with a registry using self-signed orprivate certificates.

Below are instructions on adding a self-signed or private certificate to yourtrusted ca-certificates on Linux.

Make sure you have the package ca-certificates installed.

Copy the public half of your CA certificate (the one used to sign the CSR) intothe CA certificate directory (as root):

$ cp cacert.pem /usr/share/ca-certificates

Contributing

If you plan on contributing you should be able to run the tests locally. Thetests run for CI via docker-in-docker. But running locally with go test, youneed to make one modification to your docker daemon config so that you can talkto the local registry for the tests.

Add the flag --insecure-registry localhost:5000 to your docker daemon,documented here for testingagainst an insecure registry.

OR

Run make dind dtest to avoid having to change your local docker config andto run the tests as docker-in-docker.

  • 一、wire wire类型设计时表示导线结构,它不存储状态,只能负责传递驱动级的输出。wire型数据常用来表示用以assign关键字指定的组合逻辑信号。Verilog程序模块中输入、输出信号类型默认时自定义为wire型。wire型信号可以用做任何方程式的输入,也可以用做“assign”语句或者实例原件的输出。 <font color=#999AAA >wire [n-1:0] my_

  • 命令行中执行reg /?,reg query /?即可知道reg的操作方式,此处做个记录,方便记忆 reg执行哪些操作 C:\Users\Administrator>reg /? REG Operation [Parameter List] Operation [ QUERY | ADD | DELETE | COPY | SAVE

  • 摘自另外一个同学的播客,记录自己认为的重点: 0、wire、reg都可以有四种取值:0、1、z、x;为了表示这四种取值,所以验证平台中引入可以表示四值的logic类型; 1、wire型数据常用来表示以assign关键字指定的组合逻辑信号,模块的输入输出端口类型都默认为wire型,默认初始值是z。 2、reg型表示的寄存器类型。always模块内被赋值的信号,必须定义为reg型,代表触发器。默认初始

  • 1、什么是wire线网型变量 在Verilog中, wire可以纯粹看作一根导线或者一条任意位宽的总线,其默认初始值是高组态。wire作为连线型数据对应于硬件电路的物理信号连线,所以没有电荷保持作用,需要驱动源驱动。 它有俩种驱动方式一种是把它连接到一个门或模块的输出端;另一种是用连续赋值语句assign对其赋值。没有驱动源时为高阻态,即为上面提到的默认初始值。 2、什么是reg寄存器型变量 寄存

  • 对应自己的实验目录:5-dts-led 一、需要注意的地方 略 二、涉及的函数的用法介绍 1.注册设备号 int register_chrdev_region(dev_t from, unsigned count, const char *name) @from: 申请的设备号 @count: 需要申请的设备数量 @name: 设备的名称 Return:0,成功 <0,失败 2.申请设备号 in

  • 标签: wire与reg类型的区别: wire型数据常用来表示以assign关键字指定的组合逻辑信号。模块的输入输出端口类型都默认为wire型。默认初始值是z。 reg型表示的寄存器类型。always模块内被赋值的信号,必须定义为reg型,代表触发器。 默认初始值是x。 reg 类型不一定是寄存器变量,例如组合逻辑中reg类型变量。 reg相当于存储单元,wire相当于物理连线。 Verilog

  • wire与reg的区别?什么时候用wire?什么时候用reg? 简单来说硬件描述语言有两种用途:1、仿真,2、综合。 对于wire和reg,也要从这两个角度来考虑。 从仿真的角度来说,HDL语言面对的是编译器(如Modelsim等),相当于软件思路。 这时: wire对应于连续赋值,如assign reg对应于过程赋值,如always,initial 从综合的角度来说,HDL语言面对的是综合器(如

  • 我们在cmd键入 “REG /?” 了解用法信息。 REG Operation [Parameter List] Operation [ QUERY | ADD | DELETE | COPY |SAVE | LOAD | UNLOAD | RESTORE |COMPARE | EXPORT | IMPORT | FLAGS ] 返回代码: (除了 REG COMPARE) 0 - 成功 1 -

  • 在使用Verilog进行开发时,有的reg型变量需要赋初值。经过尝试,有三种方法可以实现给reg变量赋初值。(测试使用的是EP4CE6E22C8开发板,测试时使用串口将变量值发给上位机。) 1、在定义reg变量时赋初值: reg [3:0] a = 4'd10; 2、复位时给reg变量赋值; 3、用initial语句赋初值: initial a = 4'd10; 但是很多资料说,initial

  • module counter #( parameter CNT_MAX = 25'd24_999_999 ) ( input wire sys_clk, input wire sys_rst_n, output reg led_out ); reg [24:0] cnt; reg c

  • 文章目录 前言 一、我的理解: 二、较为官方的解释(wire 类型和 reg 类型在硬件描述语言中的释义) 1、从电路综合角度来说 2、从仿真分析角度来说 三、什么时候去使用 wire 型变量或 reg 型变量 1.wire型变量 2.reg型变量 总结 前言         前面我们学习了 Verilog 的基础语法知识,对 Verilog 也有了一定的了解,但在我学习的过程中一直抱有一个疑问,

  • reg query 返回注册表的子项下的项和下一层子项的列表。 语法 reg query KeyName [{/v EntryName|/ve}] [/s] 参数 KeyName 指定子项的完全路径。对于远程计算机,请在 中的子项路径前包含计算机名称。忽略 ComputerName 会导致默认对本地计算机进行操作。以相应的子目录树开始路径。有效子目录树为 HKLM、HKCU、HKCR、HKU 以及

 相关资料
  • 问题内容: 我一直在尝试设计一种用Pattern / Matcher实例替换多个String#replaceAll调用的方法,希望它比我当前在String中替换文本的方法要快,但是我不确定该怎么做关于它。 这是我要操作的字符串的示例: 如您所见,有多个@字符,中间有3个字符。情况总是如此。如果我想替换“ @ xxx @”的每个实例(其中xxx可以是0到9之间的任何小写字母或数字),最有效的解决方法

  • 问题内容: 任何人都可以通过正则表达式来帮助我。 我想将以下字符串拆分为数字,字符串号 一种方法要求返回810,另一种要求LN,另一种应返回15。 唯一真正的解决方案是使用正则表达式,因为数字的长度会增加 我可以使用什么正则表达式来适应呢? 问题答案: 不会给您想要的结果,我猜应该是“ 810”,“ LN”,“ 15”,因为它必须寻找一个要分裂的令牌并剥夺该令牌。 尝试和替代,使用此正则表达式:,

  • 问题内容: 如何知道该字符串包含至少2个大写字母?例如, 这些是有效的字符串“ Lazy Cat”,“ NOt very lazy cat”。使用Java 1.7。 问题答案: 尝试使用以下正则表达式: or

  • 问题内容: 最近,我更改了项目的JDK 8而不是版本7,现在我使用Java 8附带的新功能覆盖了一些代码段。 如何使用Stream API编写此代码? 问题答案: 如果您重复使用JDK提供的,基于A 的分离器实现可能非常简单: 请注意,分隔符提供 所有 匹配器组,而不仅仅是完整匹配。另请注意,此分离器支持并行性,因为它实现了分离策略。 通常,您将使用便利流工厂: 这为您简洁地编写各种复杂的面向正则

  • 问题内容: 我想比较URI字符串与Java中不同模式的比较,并且我想要最快的代码。 我应该使用: 或类似的东西: 请注意,我可以使用更多的uri,因此经常调用此方法。 我的选择之间最好的答案是什么? 问题答案: 他们俩都足够快,以至于在不知不觉中就结束了。我会选择一种您更容易阅读的书。

  • 问题内容: 我不明白为什么下面的代码不按预期运行 预期产量: 实际输出: 我是否需要转义正斜线?我不这么认为,但是我也尝试了以下尝试……没有用 最后,我意识到我不需要正则表达式,我可以只使用以下内容,而不会创建正则表达式 但是,我仍然想了解为什么我的第一个示例不起作用。 问题答案: 问题实际上是您需要在替换字符串中双转义 反斜杠 。您会看到,(我确定您知道)表示替换字符串是,并且(您可能不知道)替

  • 问题内容: 我正在解析CSS,以便从链接的样式表中获取URL。这是一个Java应用程序。( 我尝试使用CSSParser( http://cssparser.sourceforge.net/ ),但是,它在解析时会默默地删除许多规则。) 所以我只是在使用Regex。我想要一个仅获取URL的正则表达式,并且足够健壮以应对来自狂野的真实CSS: 你明白了。这是在Java的regex实现中( 不是我的最

  • 问题内容: 我试图在问题历史记录中找到问题的答案,但是当他们浏览了几十个我放弃的匹配答案后,它们又回到了一千多个。所以这是我的问题。 我希望能够找到字符串中正好六个数字的第一个序列。给定字符串“一些文本987654321和一些更多的文本123456,以及其他一些文本再次654321和最后的更多文本”,我想找到与123456序列匹配的正则表达式。 我是regex的新手,对它如何工作的简短解释会很有帮