diff --git a/examples/python/Docker.md b/examples/python/Docker.md new file mode 100644 index 0000000..baab7d0 --- /dev/null +++ b/examples/python/Docker.md @@ -0,0 +1,22 @@ +## Build the Docker image(s) +To run the example plugins in the way described here, you need to first install [Docker](https://www.docker.com/). + + From the examples/python folder, execute one of the following lines according to which plugin you want to build: + + + + + - docker build -t qlik-oss/sse-scriptsupport -f Dockerfile.scriptsupport . + - docker build -t qlik-oss/sse-helloworld -f Dockerfile.helloworld . + - docker build -t qlik-oss/sse-columnoperations -f Dockerfile.columnoperations . + + + +## Run the Docker container(s) +Execute one of the following commands to run the plugin of choice in a docker container: + + + + - docker run --rm -p 50051:50051 qlik-oss/sse-scriptsupport + - docker run --rm -p 50052:50052 qlik-oss/sse-helloworld + - docker run --rm -p 50053:50053 qlik-oss/sse-columnoperations diff --git a/examples/python/Dockerfile.columnoperations b/examples/python/Dockerfile.columnoperations new file mode 100644 index 0000000..127f2f2 --- /dev/null +++ b/examples/python/Dockerfile.columnoperations @@ -0,0 +1,10 @@ +FROM grpc/python + +ADD . /app + +WORKDIR /app +ENTRYPOINT ["python"] +CMD ["ColumnOperations/ExtensionService_column.py"] +EXPOSE 50053 + + diff --git a/examples/python/Dockerfile.helloworld b/examples/python/Dockerfile.helloworld new file mode 100644 index 0000000..127a398 --- /dev/null +++ b/examples/python/Dockerfile.helloworld @@ -0,0 +1,10 @@ +FROM grpc/python + +ADD . /app + +WORKDIR /app +ENTRYPOINT ["python"] +CMD ["HelloWorld/ExtensionService_helloworld.py"] +EXPOSE 50052 + + diff --git a/examples/python/Dockerfile.scriptsupport b/examples/python/Dockerfile.scriptsupport new file mode 100644 index 0000000..3150767 --- /dev/null +++ b/examples/python/Dockerfile.scriptsupport @@ -0,0 +1,13 @@ +FROM grpc/python + +RUN pip install -U pip +RUN pip install numpy + +ADD . /app + +WORKDIR /app +ENTRYPOINT ["python"] +CMD ["FullScriptSupport/ExtensionService_Script.py"] +EXPOSE 50051 + + diff --git a/examples/python/GetStarted.md b/examples/python/GetStarted.md index 0c7ae90..54d9d1c 100644 --- a/examples/python/GetStarted.md +++ b/examples/python/GetStarted.md @@ -1,5 +1,7 @@ # Getting started with the Python examples +If you want to use [Docker](http://www.docker.com/) to build and run the examples, here's a [quickstart](Docker.md). + We provide several examples at different levels of complexity, each of which is documented separately. All examples support mutual authentication. Note that the examples do **not** necessarily support the same functionality; therefore a function call in one example might not work in another. The following table includes a short description of each example and the functionality it demonstrates.