You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/04/16 22:09:40 UTC

[GitHub] ddragosd closed pull request #117: do docker pull for quick start

ddragosd closed pull request #117: do docker pull for quick start
URL: https://github.com/apache/incubator-openwhisk-devtools/pull/117
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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`


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services