https://github.com/cppforlife/docker-registry-boshrelease
Boshrelease that load distribution/registry image (Docker registry) to Docker server
https://github.com/cppforlife/docker-registry-boshrelease
Last synced: 8 months ago
JSON representation
Boshrelease that load distribution/registry image (Docker registry) to Docker server
- Host: GitHub
- URL: https://github.com/cppforlife/docker-registry-boshrelease
- Owner: cppforlife
- License: apache-2.0
- Created: 2015-12-03T22:34:03.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T22:40:56.000Z (about 10 years ago)
- Last Synced: 2025-01-02T09:25:36.067Z (about 1 year ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Docker-registry-boshrelease
Bosh release for provisioning private docker registry image offline.
It was created based on the following [blogpost](https://blog.starkandwayne.com/2015/04/28/embed-docker-into-bosh-releases/) and generated with the bosh-gen tool.
## Prerequisites
- [Running Docker boshrelease](https://github.com/cf-platform-eng/docker-boshrelease#usage)
## Usage
- Provision docker-registry-boshrelease
```
git clone http://github.com/compozed/docker-registry-boshrelease.git && cd docker-registry-boshrelease
bosh create release --force
bosh upload release
```
- Collocate docker-registry-boshrelease with docker deployment
Edit releases in docker deployment manifest to provision docker-registry. See example:
```
releases:
- name: docker
version: 15
- name: docker-registry
version: latest
```
Collocate distribution_registry_image template in docker job (daemon). See example:
```
jobs:
...
- name: docker
templates:
- name: distribution_registry_image
release: docker-registry
- name: docker
release: docker
- name: containers
release: docker
```
- Running docker registry container
Edit properties in docker deployment manifest to run a private registry container. See example:
```
properties:
containers:
- name: registry
image: "distribution/registry"
bind_ports:
- "5000:5000"
bind_volumes:
- "/var/lib/registry"
docker:
insecure_registries:
- ':5000'
```
## Push images to private docker registry
__Prerequisites:__
Running docker deamon that can:
- Pull images from hub.docker.com.
- Push to the running private registry (Daemon running with option: `--insecure-registry :5000`)
__Steps:__
- Pull Docker image
```
docker pull
```
- Tag the docker image to point to the registry
```
docker tag [DOCKER_VM_IP>:5000 or URI]/
```
- Push the image to the registry
```
docker push [DOCKER_VM_IP>:5000 or URI]/
```