openwhisk-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dra...@apache.org
Subject [incubator-openwhisk-devtools] branch master updated: do docker pull for quick start (#117)
Date Mon, 16 Apr 2018 22:09:40 GMT
This is an automated email from the ASF dual-hosted git repository.

dragos pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-devtools.git


The following commit(s) were added to refs/heads/master by this push:
     new 2f5c113  do docker pull for quick start (#117)
2f5c113 is described below

commit 2f5c11317c400671dc4956347bc0eb731d47ff2f
Author: Carlos Santana <csantanapr@apache.org>
AuthorDate: Mon Apr 16 18:09:37 2018 -0400

    do docker pull for quick start (#117)
---
 docker-compose/Makefile  | 36 +++++++++++++++++++++++++++++++-----
 docker-compose/README.md | 16 +++++++++++-----
 2 files changed, 42 insertions(+), 10 deletions(-)

diff --git a/docker-compose/Makefile b/docker-compose/Makefile
index 848d9d1..0a0d52d 100644
--- a/docker-compose/Makefile
+++ b/docker-compose/Makefile
@@ -22,7 +22,7 @@ OPEN_WHISK_DB_PREFIX ?= local_
 DOCKER_KERNEL ?= $(shell docker version --format "{{.Server.KernelVersion}}")
 ifeq ("$(UNAME_STR)","Linux")
 	DOCKER_BINARY ?= $(shell (which docker))
-else 
+else
 	DOCKER_BINARY ?= $(shell if [[ $(DOCKER_KERNEL) == *-moby || $(DOCKER_KERNEL) ==  *-boot2docker
]]; then (docker run --rm --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh -c "which
docker"); else (which docker); fi)
 endif
 ifndef VERBOSE
@@ -34,7 +34,7 @@ endif
 #   2. then it starts all components using docker-compose
 #   3. it runs a sample hello-world function
 #   To stop and cleanup the environment use: make destroy
-quick-start: download download-cli run quick-start-pause hello-world quick-start-info
+quick-start: download download-cli docker_pull run quick-start-pause hello-world quick-start-info
 
 add-catalog: download-catalog init-catalog
 
@@ -73,10 +73,36 @@ quick-start-info:
 	echo "$$(tput setaf 2)To invoke the function again use: $$(tput setaf 4)make hello-world$$(tput
sgr0)"
 	echo "$$(tput setaf 2)To stop openwhisk use: $$(tput setaf 4)make destroy$$(tput sgr0)"
 
-docker:
-	echo "building the docker images ... "
+docker_build:
+	echo "building the docker images short list ... "
+	cd $(OPENWHISK_PROJECT_HOME) && \
+		./gradlew distDocker -PdockerImagePrefix=$(DOCKER_IMAGE_PREFIX) -x :actionRuntimes:pythonAction:distDocker
 -x :actionRuntimes:python2Action:distDocker -x actionRuntimes:swift3.1.1Action:distDocker
-x actionRuntimes:swift4.1Action:distDocker -x :actionRuntimes:javaAction:distDocker
+
+docker_build_full:
+	echo "building the docker images full list ... "
 	cd $(OPENWHISK_PROJECT_HOME) && \
-		./gradlew distdocker -x :core:swift3Action:distDocker -x :core:swiftAction:distDocker
+		./gradlew distDocker -PdockerImagePrefix=$(DOCKER_IMAGE_PREFIX)
+
+docker_pull:
+	echo "pulling the docker images short list... "
+	docker pull $(DOCKER_IMAGE_PREFIX)/controller
+	docker pull $(DOCKER_IMAGE_PREFIX)/invoker
+	docker pull $(DOCKER_IMAGE_PREFIX)/nodejs6action
+	docker pull $(DOCKER_IMAGE_PREFIX)/dockerskeleton
+
+docker_pull_full:
+	echo "pulling the docker images full list ... "
+	docker pull $(DOCKER_IMAGE_PREFIX)/controller
+	docker pull $(DOCKER_IMAGE_PREFIX)/invoker
+	docker pull $(DOCKER_IMAGE_PREFIX)/nodejs6action
+	docker pull $(DOCKER_IMAGE_PREFIX)/action-nodejs-v8
+	docker pull $(DOCKER_IMAGE_PREFIX)/python2action
+	docker pull $(DOCKER_IMAGE_PREFIX)/python3action
+	docker pull $(DOCKER_IMAGE_PREFIX)/action-swift-v3.1.1
+	docker pull $(DOCKER_IMAGE_PREFIX)/action-swift-v4.1
+	docker pull $(DOCKER_IMAGE_PREFIX)/java8action
+	docker pull $(DOCKER_IMAGE_PREFIX)/action-php-v7.1
+	docker pull $(DOCKER_IMAGE_PREFIX)/dockerskeleton
 
 download-cli:
 	echo "downloading the CLI tool ... "
diff --git a/docker-compose/README.md b/docker-compose/README.md
index 7d0d08d..d0c58a0 100644
--- a/docker-compose/README.md
+++ b/docker-compose/README.md
@@ -81,15 +81,21 @@ make restart-controller
 
 * Check the [issue tracker](https://github.com/apache/incubator-openwhisk-devtools/issues)
for more.
 
-# Build
+# Build or Pull
 
+You can pull pre-built image
 ```bash
-make docker
+make docker_pull
 ```
 
-This command builds the docker containers for local testing and development.
+This command pulls the docker images for local testing and development.
+
+```bash
+make docker_build
+```
+
+This command builds the docker images for local testing and development.
 
-> NOTE: The build may skip some components such as Swift actions in order to finish the
build faster.
 
 # Start
 
@@ -200,6 +206,6 @@ These 2 variable allow you to execute a JS action using the container
`registry.
 
 ## Local Docker containers for controllers and invokers
 
-By default this setup uses published images for controller and invokers from `openwhisk`
namespace i.e. 
+By default this setup uses published images for controller and invokers from `openwhisk`
namespace i.e.
 `openwhisk/controller` and `openwhisk/invoker`. To make use of locally build images you can
use `DOCKER_OW_IMAGE_PREFIX`
 variable i.e. `DOCKER_OW_IMAGE_PREFIX=whisk make quick-start`

-- 
To stop receiving notification emails like this one, please contact
dragos@apache.org.

Mime
View raw message