Explorar o código

Initial commit

theenglishway (time) %!s(int64=7) %!d(string=hai) anos
achega
b6d611403d
Modificáronse 4 ficheiros con 66 adicións e 0 borrados
  1. 1 0
      .gitignore
  2. 24 0
      README.md
  3. 28 0
      http-insecure/README.md
  4. 13 0
      http-insecure/docker-compose.yml

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+.idea/

+ 24 - 0
README.md

@@ -0,0 +1,24 @@
+Handle LAN Docker-registry with various setups
+
+Docker image `dolphm/network-tools` can be used to check 
+connectivity from other containers 
+
+## API calls
+
+Check that the insecure HTTP server is up and running :
+
+```sh
+curl <host-machine-name>:5000/v2/ 
+```
+
+## Useful stuff
+
+* Stuff handled by docker-compose (networks, volumes, ..) is by default named 
+after the root directory
+* When a Docker network is setup, the IP address returned for 
+<machine_name>.local changes from 192.168.x.x to the address of the local Docker 
+network.  
+
+## Documentation
+
+* [Deploy a Docker registry](https://docs.docker.com/registry/deploying/)

+ 28 - 0
http-insecure/README.md

@@ -0,0 +1,28 @@
+## HTTP registry (insecure)
+
+### Setup
+
+On the machine hosting the registry, run :
+
+```sh
+cd http-insecure
+docker-compose up -d
+```
+
+### Use
+
+On the local machine, the registry can be used as-is.
+
+On the LAN's machines, `/etc/docker/daemon.json` has to contain (run 
+`systemctl restart docker` after) :
+```json
+{ "insecure-registries":["<machine-name>:5000"] }
+```
+
+Then upload with the following command :
+
+```sh
+docker tag <image-name> <machine-name>:5000/<image-name>
+docker push <machine-name>:5000/<image-name>
+```
+

+ 13 - 0
http-insecure/docker-compose.yml

@@ -0,0 +1,13 @@
+version: '3'
+
+services:
+  local-registry:
+    image: registry:2
+    container_name: http-registry
+    volumes:
+      - local-registry-data:/var/lib/registry
+    ports:
+      - 5000:5000
+
+volumes:
+  local-registry-data: