Skip to content
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.

Commit

Permalink
updating readme, adding properly working fig.yml file, updating version
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Dec 9, 2014
1 parent adf786d commit b0a7c8f
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config/local.js
node_modules
.git
58 changes: 58 additions & 0 deletions README.install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# Overview

# Requirements

1. Docker
2. Docker Registry
3. Redis (this stores image and user information, you should run redis in a persistent mode that will meet your needs)

# Installation

## Production

The best way to do this is to use docker all the way and to use host mounted volumes for configuration files OR build each app by checking out the code and changing the configuration files.

1. docker pull dockerfile/redis
2. docker pull registry:0.9.0
3. docker pull ekristen/docker-index:1.4.0-rc1
4. Create folders for the docker registry and index config files.
* mkdir /data/redis
* mkdir /data/registry
* mkdir /data/index
5. Start redis
```
docker run -d --name="index_redis" \
-v /data/redis:/data \
dockerfile/redis
```
6. Start the registry
* You should review the config_sample.yml and pick your settings_flavor and set the environment variables you need.
```
docker run -d --name="registry" \
-e SETTINGS_FLAVOR=local \
-e STANDALONE=false \
-p 5000:5000 \
-v /tmp/registry:/data/registry \
registry:0.9.0
```
7. Start the index
```
docker run -d --name="docker_index" \
-p 5100:5100 \
-e REGISTRIES=registry.private.io \
--link redis:redis \
ekristen/docker-index:1.4.0-rc1
```
I'd suggest that you front both the index and the registry using nginx and SSL/TLS and use port 443. You can take a look at [my docker-index-nginx image](https://github.com/ekristen/docker-index-nginx)
## Development or Testing
Use Fig! I've included a fig.yml file in this repository, which given a docker server you can deploy a working setup, however you will need to setup a few things first.
By default the `fig.yml` uses `index.private.io` and `registry.private.io` for its hostnames, if you want to use something different make sure to update the `fig.yml` file. Either way you'll have to setup some sort of local DNS to make it work properly.
If you setup the the DNS properly all you should have to do is `fig up` and everything else will take care of itself.
36 changes: 9 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,42 +21,22 @@ This is a functioning Docker Index that can be run independent of the Docker Reg
- Account Registration by just doing a docker login (can be disabled)
- New accounts can also be disabled by default

# Installation

Check out the [Installation Document](README.install.md)

# API Documentation

API Docs Coming Soon

# Command Line Tool
# Management / CLI Tool

To facilitate working with the `docker-index` more easily, there is a command line tool available. https://github.com/ekristen/docker-index-cli

# Requirements

1. Docker
2. Docker Registry
3. Redis (this stores image and user information, you should run redis in a persistent mode that will meet your needs)

# Installation

The best way to do this is to use docker all the way and to use host mounted volumes for configuration files OR build each app by checking out the code and changing the configuration files.

1. git clone
2. docker pull dockerfile/redis
3. docker pull registry
4. docker build -t docker_index .
5. Create folders for the docker registry and index config files.
* mkdir /data/registry/config
* mkdir /data/index/config
6. Grab a copy of the registry config file, and create a *prod* section and fill it out according to your needs and drop it in the folder you created for the registry using the filename *config.yml*. Make sure you set index_endpoint configuration option.
7. docker run -d -name "index_redis" dockerfile/redis
8. docker run -d -name "docker_registry" -p 5000:5000 -e SETTINGS\_FLAVOR=prod -v /data/registry/config:/docker-registry/config
9. docker run -d -name "docker_index" -p 5100:5100 -e REGISTRIES=hostname.to.registry --link index\_redis:redis -v /data/index/config:/opt/app/config docker\_index

I'd suggest that you front both the index and the registry using nginx and SSL/TLS and use port 443.

# Management

All management is done via the new command line tool over at https://github.com/ekristen/docker-index-cli

# Other Information

## Initial Admin Account

When you start the docker index application for the first time, a first run text will be displayed to standard out. This text will contain the randomly set password for the default `admin` account.
Expand All @@ -69,3 +49,5 @@ There are three access levels (aka permissions) for a namespace and/or repo comb
* **write** gives a user write access only, this is useful for automation scripts that you want to only have access to upload to a repo.
* **admin** gives a user read, write, and delete (not implemented) access to a namespace and/or namespace/repo.



14 changes: 9 additions & 5 deletions fig.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
redis:
image: dockerfile/redis
# volumes:
# - /data/redis:/data
# - /data/redis:/registry/data

registry:
image: registry:0.8.0
image: ekristen/docker-index-registry:0.9.0
ports:
- 5000:5000
environment:
- SETTINGS_FLAVOR=local
- DEBUG=true
- STANDALONE=false
- INDEX_ENDPOINT=https://index.private.io
- LOGLEVEL=debug
- DISABLE_TOKEN_AUTH=false
- SETTINGS_FLAVOR=local
- INDEX_ENDPOINT=https://index.private.io
# volumes:
# - /tmp/registry:/data/registry

index:
image: ekristen/docker-index:1.4.0-rc1
image: ekristen/docker-index:dev
ports:
- 5100:5100
environment:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "docker-index",
"version": "1.4.0-rc1",
"version": "1.4.0-rc2",
"author": "Erik Kristensen <[email protected]>",
"license": "LICENSE.md",
"private": true,
Expand Down

0 comments on commit b0a7c8f

Please sign in to comment.