Repository: incubator-hawq Updated Branches: refs/heads/master 5d6afbe75 -> 0a271bc99
HAWQ-1655. Fix doc and makefile issue for hawq-docker Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0a271bc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0a271bc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0a271bc9 Branch: refs/heads/master Commit: 0a271bc991f03ec3492a78608a524c197d157ade Parents: 5d6afbe Author: Fenggang <[email protected]> Authored: Mon Aug 13 03:00:50 2018 -0400 Committer: rlei <[email protected]> Committed: Tue Aug 21 17:11:45 2018 +0800 ---------------------------------------------------------------------- contrib/hawq-docker/Makefile | 11 +++++++++-- contrib/hawq-docker/README.md | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 43 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0a271bc9/contrib/hawq-docker/Makefile ---------------------------------------------------------------------- diff --git a/contrib/hawq-docker/Makefile b/contrib/hawq-docker/Makefile index 120ebe2..2005352 100644 --- a/contrib/hawq-docker/Makefile +++ b/contrib/hawq-docker/Makefile @@ -203,8 +203,15 @@ remove-data: pull: @echo latest images - docker pull hawq/hawq-dev:$(OS_VERSION) - docker pull hawq/hawq-test:$(OS_VERSION) + #There is no hawq repo in docker.io currently, we just build up a local repo to mimic the docker registry here. + #For remote registry. + #docker pull hawq/hawq-dev:$(OS_VERSION) + #docker pull hawq/hawq-test:$(OS_VERSION) + #For local registry, user need to install local registry and push images before following steps. + docker pull localhost:5000/hawq-dev:$(OS_VERSION) + docker pull localhost:5000/hawq-test:$(OS_VERSION) + docker tag localhost:5000/hawq-dev:$(OS_VERSION) hawq/hawq-dev:$(OS_VERSION) + docker tag localhost:5000/hawq-test:$(OS_VERSION) hawq/hawq-test:$(OS_VERSION) clean: @make -f $(THIS_MAKEFILE_PATH) stop 2>&1 >/dev/null || true http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0a271bc9/contrib/hawq-docker/README.md ---------------------------------------------------------------------- diff --git a/contrib/hawq-docker/README.md b/contrib/hawq-docker/README.md index 4adeaaf..0e70de9 100644 --- a/contrib/hawq-docker/README.md +++ b/contrib/hawq-docker/README.md @@ -17,13 +17,11 @@ https://docs.docker.com/ git clone https://github.com/apache/incubator-hawq.git . cd incubator-hawq/contrib/hawq-docker ``` -* Get the docker images +* Build the docker images ``` - make pull (recommended) -OR make build ``` -(Command `make pull` is to pull docker images from Docker Hub, while command `make build` is to build docker images locally. In general, `make pull` is faster than `make build`.) +(Command `make build` is to build docker images locally.) * setup a 5 nodes virtual cluster for Apache HAWQ build and test. ``` make run @@ -83,6 +81,38 @@ Type "help" for help. postgres=# ``` +# Store docker images in local docker registry + +After your hawq environment is up and running, you could draft a local docker registry to store your hawq images locally for further usage. +* pull and run a docker registry +``` +docker pull registry +docker run -d -p 127.0.0.1:5000:5000 registry +``` +Make sure you could get the following output +``` +curl http://localhost:5000/v2/_catalog +{"repositories":[]} +``` +You could push your local hawq images to local repository, let us use "centos7" as example +``` +docker tag hawq/hawq-test:centos7 localhost:5000/hawq-test:centos7 +docker tag hawq/hawq-dev:centos7 localhost:5000/hawq-dev:centos7 +docker push localhost:5000/hawq-test +docker push localhost:5000/hawq-dev +``` +Now the local registry has images in it +``` +curl http://localhost:5000/v2/_catalog +{"repositories":["hawq-dev","hawq-test"]} +``` + +If we want to pull the images from local repo +``` +make pull +``` + + # More command with this script ``` Usage:
