mirror of
https://github.com/genuinetools/reg.git
synced 2024-05-20 03:58:32 -04:00
update readme and dockerfile
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
57e5dcd240
commit
aeff5763cc
|
@ -12,8 +12,8 @@ RUN apk add --no-cache \
|
|||
xz
|
||||
|
||||
ENV DOCKER_BUCKET get.docker.com
|
||||
ENV DOCKER_VERSION 17.03.0-ce
|
||||
ENV DOCKER_SHA256 4a9766d99c6818b2d54dc302db3c9f7b352ad0a80a2dc179ec164a3ba29c2d3e
|
||||
ENV DOCKER_VERSION 1.11.1
|
||||
ENV DOCKER_SHA256 893e3c6e89c0cd2c5f1e51ea41bc2dd97f5e791fcfa3cee28445df277836339d
|
||||
|
||||
RUN set -x \
|
||||
&& curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION.tgz" -o docker.tgz \
|
||||
|
|
10
Makefile
10
Makefile
|
@ -58,15 +58,14 @@ DIND_DOCKER_IMAGE=r.j3ss.co/docker:userns
|
|||
dind:
|
||||
docker build --rm --force-rm -f Dockerfile.dind -t $(DIND_DOCKER_IMAGE) .
|
||||
docker run -d \
|
||||
--tmpfs /var/lib/docker \
|
||||
-v /var/lib/docker2:/var/lib/docker \
|
||||
--name $(DIND_CONTAINER) \
|
||||
--privileged \
|
||||
-v $(CURDIR)/.certs:/etc/docker/ssl \
|
||||
-v $(CURDIR):/go/src/github.com/jessfraz/reg \
|
||||
-v /tmp \
|
||||
--tmpfs /tmp \
|
||||
-v /tmp:/tmp \
|
||||
$(DIND_DOCKER_IMAGE) \
|
||||
dockerd -D --storage-driver $(DOCKER_GRAPHDRIVER) \
|
||||
docker daemon -D --storage-driver $(DOCKER_GRAPHDRIVER) \
|
||||
-H tcp://127.0.0.1:2375 \
|
||||
--host=unix:///var/run/docker.sock \
|
||||
--disable-legacy-registry=true \
|
||||
|
@ -85,10 +84,11 @@ dtest:
|
|||
-v $(CURDIR):/go/src/github.com/jessfraz/reg \
|
||||
--workdir /go/src/github.com/jessfraz/reg \
|
||||
-v $(CURDIR)/.certs:/etc/docker/ssl:ro \
|
||||
--volumes-from $(DIND_CONTAINER) \
|
||||
-v /tmp:/tmp \
|
||||
--net container:$(DIND_CONTAINER) \
|
||||
-e DOCKER_HOST=tcp://127.0.0.1:2375 \
|
||||
-e DOCKER_TLS_VERIFY=true \
|
||||
-e DOCKER_CERT_PATH=/etc/docker/ssl \
|
||||
-e DOCKER_API_VERSION=1.23 \
|
||||
$(DOCKER_IMAGE) \
|
||||
make test
|
||||
|
|
15
README.md
15
README.md
|
@ -11,6 +11,7 @@ Docker registry v2 command line client.
|
|||
- [Download a Layer](#download-a-layer)
|
||||
- [Delete an Image](#delete-an-image)
|
||||
- [Vulnerability Reports](#vulnerability-reports)
|
||||
- [Testing](#testing)
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -155,3 +156,17 @@ Low: 3
|
|||
Medium: 3
|
||||
High: 1
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
If you plan on contributing you should be able to run the tests locally. The
|
||||
tests run for CI via docker-in-docker. But running locally with `go test`, you
|
||||
need to make one modification to your docker daemon config so that you can talk
|
||||
to the local registry for the tests.
|
||||
|
||||
Add the flag `--insecure-registry localhost:5000` to your docker daemon,
|
||||
documented [here](https://docs.docker.com/registry/insecure/) for testing
|
||||
against an insecure registry.
|
||||
|
||||
OR run `make dind dtest` to avoid having to change your local docker config and
|
||||
to run the tests as docker-in-docker.
|
||||
|
|
Loading…
Reference in a new issue