<p>Both Docker Registry and Docker Engine have API interfaces.
I consider it should be possible to implement a Docker plugin for this integration to have images scanned for example as somebody pushes them. (side note - Docker registry is an image registry, not container registry).</p>

<p>This scanner functionality is also possible through the commercial Docker Enterprise edition.
<a href="https://docs.docker.com/docker-cloud/builds/image-scan/" rel="nofollow noreferrer">https://docs.docker.com/docker-cloud/builds/image-scan/</a></p>

<p>UPD here an example with clair/docker, looks quite simple
<a href="http://blog.xebia.com/docker-containers-vulnerability-scan-clair/" rel="nofollow noreferrer">http://blog.xebia.com/docker-containers-vulnerability-scan-clair/</a></p>

CC BY-SA 3.0
2017-09-19T09:16:41.477Z
[`could not find layer`](https://github.com/arminc/clair-scanner/issues/13)
030
CC BY-SA 3.0
2017-09-19T08:55:54.420Z
2017-09-19T08:55:54.420Z
Ta Mu
<p>According to the following documentation it should be possible to integrate <a href="https://coreos.com/clair/docs/latest/" rel="nofollow noreferrer">clair</a> with a docker private registry. How to do that?</p>

<blockquote>
  <p><strong><a href="https://github.com/coreos/clair/blob/master/Documentation/running-clair.md#registry-integration" rel="nofollow noreferrer">Registry Integration</a></strong></p>
  
  <p>Clair can be integrated directly into a container registry such that
  the registry is responsible for interacting with Clair on behalf of
  the user. This type of setup avoids the manual scanning of images and
  creates a sensible location to which Clair's vulnerability
  notifications can be propagated. The registry can also be used for
  authorization to avoid sharing vulnerability information about images
  to which one might not have access.</p>
</blockquote>

CC BY-SA 3.0
2017-10-19T12:50:53.293Z
You may consider this image on docker hub for starting/playing with Clair: https://hub.docker.com/r/arminc/clair-local-scan/
user54
<security><clair><registry>
Docker Security Scanning: How to integrate Clair with a docker private registry?
030
# Docker Security Scanning: How to integrate Clair with a docker private registry?

(Asked by: username_0 on 2017-09-19)

According to the following documentation it should be possible to integrate [clair](https://coreos.com/clair/docs/latest/) with a docker private registry. How to do that?

> **[Registry Integration](https://github.com/coreos/clair/blob/master/Documentation/running-clair.md#registry-integration)**
>
> Clair can be integrated directly into a container registry such that
> the registry is responsible for interacting with Clair on behalf of
> the user. This type of setup avoids the manual scanning of images and
> creates a sensible location to which Clair's vulnerability
> notifications can be propagated. The registry can also be used for
> authorization to avoid sharing vulnerability information about images
> to which one might not have access.

**Tags:** security, clair, registry

> **Comments:**
> **username_1**: You may consider this image on docker hub for starting/playing with Clair: https://hub.docker.com/r/arminc/clair-local-scan/  

---

## 1 answers

### Answer by username_2 on 2017-09-19. Score: 0 | Accepted answer

Both Docker Registry and Docker Engine have API interfaces.
I consider it should be possible to implement a Docker plugin for this integration to have images scanned for example as somebody pushes them. (side note - Docker registry is an image registry, not container registry).

This scanner functionality is also possible through the commercial Docker Enterprise edition.
<https://docs.docker.com/docker-cloud/builds/image-scan/>

UPD here an example with clair/docker, looks quite simple
<http://blog.xebia.com/docker-containers-vulnerability-scan-clair/>

> **Comments:**
> **username_0**: [`could not find layer`](https://github.com/arminc/clair-scanner/issues/13)  

---

