Skip to content

Commit

Permalink
Merge pull request #1 from Pick1a1username/devel0
Browse files Browse the repository at this point in the history
Devel0
  • Loading branch information
Pick1a1username authored Jan 23, 2019
2 parents 6f94260 + 40cbbd4 commit f07c29a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM docker:18.09.1-dind

ADD ./additional_entrypoint.sh /additional_entrypoint.sh

ENTRYPOINT ["/additional_entrypoint.sh"]
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Docker in Docker for Insecure Registry

This `Dockerfile` is for setting insecure registry easily.


## Getting Started


### Clone the Repository

Clone this repository using `git clone`

```
$ git clone https://github.com/Pick1a1username/docker_dind_for_insecure_registry.git
```


### Build the Docker Image

```
$ cd docker_dind_for_insecure_registry
$ docker build -t docker_dind_insecure:0.1 .
$ docker image ls
```

### Usage

This image is supposed to be used in Docker Compose.

When you use this image, you should specify an environment variable named `REGISTRY_ADDR`, the hostname of IP address without port number of a Docker Registry.

Note that the port number of the Docker Registry is expected to be `5000`.


## References

https://docs.docker.com/registry/insecure/


## Contributing

Any suggestions are welcome!


## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
6 changes: 6 additions & 0 deletions additional_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

mkdir /etc/docker
echo "{\"insecure-registries\" : [\"${REGISTRY_ADDR}:5000\"]}" > /etc/docker/daemon.json

dockerd-entrypoint.sh

0 comments on commit f07c29a

Please sign in to comment.