Merge pull request #633 from hainingzhang/master

community prebuilt images for Harbor
This commit is contained in:
Daniel Jiang 2016-08-03 17:23:09 +08:00 committed by GitHub
commit 83c618c632
3 changed files with 37 additions and 3 deletions

View File

@ -65,6 +65,9 @@ If you are upgrading Harbor from an older version with existing data, you need t
### Run ### Run
For information on how to use Harbor, please take a look at [User Guide](docs/user_guide.md). For information on how to use Harbor, please take a look at [User Guide](docs/user_guide.md).
### Community
Get connected with Project Harbor's community and join the discussion on Slack: [https://vmwarecode.slack.com](https://vmwarecode.slack.com) Channel: #harbor
### Contribution ### Contribution
We welcome contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a pull request. For any questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq). We welcome contributions from the community. If you wish to contribute code and you have not signed our contributor license agreement (CLA), our bot will update the issue when you open a pull request. For any questions about the CLA process, please refer to our [FAQ](https://cla.vmware.com/faq).

View File

@ -1 +1,23 @@
docker-compose.sh is used to configure docker-compose.yml to pull images from platform like docker hub, daocloud.io and others. If you don't want to waste time on building images, you can execute this script to pull images from platform you prefer. Currently, we only support daocloud.io and docker hub, the default is docker hub. ## Make use of pre-built images of Harbor
Community members have helped building Harbor's docker images. If you want to save time from building Harbor from source, please follow the below instructions to quickly pull Harbor's pre-built images for installation.
### Steps
Run the command `update_compose.sh` :
```
$ ./update_compose.sh
Please enter the registry service you want to pull the pre-built images from.
Enter 1 for Docker Hub.
Enter 2 for Daocloud.io (recommended for Chinese users).
or enter other registry URL such as https://my_registry/harbor/ .
The default is 1 (Docker Hub):
```
Enter **1** to pull images from Docker Hub,
Enter **2** to pull image from Daocloud.io, recommended for Chinese users.
or Enter other registry URL like `https://my_registry/harbor/` . Do not forget the "/" and the end.
This command backs up and updates the file `Deploy/docker-compose.yml` . Next, just follow the [Harbor Installation Guide](../../docs/installation_guide.md) to install Harbor.

View File

@ -1,5 +1,12 @@
#/bin/bash #/bin/bash
read -p "Please input the platform name you want to pull images, for docker hub, enter 1; for daocloud.io, enter 2, otherwise enter the name of the platform, the default is 1:" choice
echo " "
echo "Please enter the registry service you want to pull the pre-built images from."
echo "Enter 1 for Docker Hub."
echo "Enter 2 for Daocloud.io (recommended for Chinese users)."
echo "or enter other registry URL such as https://my_registry/harbor/ ."
read -p "The default is 1 (Docker Hub): " choice
cd ../../Deploy cd ../../Deploy
template_file="docker-compose.yml.template" template_file="docker-compose.yml.template"
yml_file='docker-compose.yml' yml_file='docker-compose.yml'
@ -29,4 +36,6 @@ sed -i -- '/build: .\/log\//c\ image: '$platform$log$version'' $yml_file
sed -i -- '/build: .\/db\//c\ image: '$platform$db$version'' $yml_file sed -i -- '/build: .\/db\//c\ image: '$platform$db$version'' $yml_file
sed -i -- '/ui:/{n;N;N;d}' $yml_file && sed -i -- '/ui:/a\\ image: '$platform$ui$version'' $yml_file sed -i -- '/ui:/{n;N;N;d}' $yml_file && sed -i -- '/ui:/a\\ image: '$platform$ui$version'' $yml_file
sed -i -- '/jobservice:/{n;N;N;d}' $yml_file && sed -i -- '/jobservice:/a\\ image: '$platform$job_service$version'' $yml_file sed -i -- '/jobservice:/{n;N;N;d}' $yml_file && sed -i -- '/jobservice:/a\\ image: '$platform$job_service$version'' $yml_file
echo "succeed! " echo "Succeeded! "
echo "Please follow the normal installation process to install Harbor."