Skip to content

Ansible Makefile doesnt seem to like being in a directory with spaces in the filename #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DataLayerService/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ src/main/java/org/microfunctions/data_layer/DataLayerService.java: \
cd ../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
docker run --rm -i --name datalayer-thrift \
--user $(UID):$(GID) \
-v $(CURDIR):/usr/src/datalayer -w /usr/src/datalayer \
-v "$(CURDIR)":/usr/src/datalayer -w /usr/src/datalayer \
$(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) \
bash -c 'thrift --gen java -out ./src/main/java/ ./thrift/DataLayerMessage.thrift; thrift --gen java -out ./src/main/java/ ./thrift/DataLayerService.thrift'
touch src/main/java/org/microfunctions/data_layer/DataLayerService.java
Expand All @@ -45,7 +45,7 @@ PythonClient/data_layer: \
cd ../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
docker run --rm -i --name datalayer-thrift \
--user $(UID):$(GID) \
-v $(CURDIR):/usr/src/datalayer -w /usr/src/datalayer \
-v "$(CURDIR)":/usr/src/datalayer -w /usr/src/datalayer \
$(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) \
bash -c 'thrift --gen py -out ./PythonClient ./thrift/DataLayerMessage.thrift; thrift --gen py -out ./PythonClient ./thrift/DataLayerService.thrift'

Expand Down Expand Up @@ -75,7 +75,7 @@ target/datalayerservice.jar: $(JAVA_SOURCES) \
if [ ! -e .m2/repository ]; then mkdir -p .m2/repository; fi
docker run --rm -i --name datalayer-maven \
--user $(UID):$(GID) \
-e HOME=/usr/src/datalayer -v $(CURDIR):/usr/src/datalayer -w /usr/src/datalayer \
-e HOME=/usr/src/datalayer -v "$(CURDIR)":/usr/src/datalayer -w /usr/src/datalayer \
maven:3.6.1-jdk-8 \
mvn -Drevision=$(GIT_REVISION) -Dlibthrift.version=$(MVN_LIBTHRIFT_VERSION) -DargLine="-Duser.home=/tmp" -s /usr/src/datalayer/.m2/settings-docker.xml package

Expand Down
4 changes: 2 additions & 2 deletions FunctionWorker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ $(PYTHON_DATALAYER): ../build_env.mk \
../DataLayerService/thrift/DataLayerService.thrift \
../build_tools/thrift/$(THRIFT_VERSION)/build_thrift.sh
cd ../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
docker run --user $(UID):$(GID) --rm -v $(CURDIR)/..:/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
docker run --user $(UID):$(GID) --rm -v "$(CURDIR)/..":/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
thrift --gen py -out FunctionWorker/python/ DataLayerService/thrift/DataLayerMessage.thrift; \
thrift --gen py -out FunctionWorker/python/ DataLayerService/thrift/DataLayerService.thrift'

doc/MicroFunctionsAPI.html: $(PYTHON_DATALAYER)
docker run --user $(UID):$(GID) --rm -i \
--name mfnapi_doc_gen \
-v $(CURDIR):/opt/mfnapi \
-v "$(CURDIR)":/opt/mfnapi \
-w /opt/mfnapi \
-e http_proxy \
-e https_proxy \
Expand Down
8 changes: 4 additions & 4 deletions JavaRequestHandler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ CLASSFILES=$(shell find target/classes/org/microfunctions/mfnapi/ -type f)
mfnapi.jar: $(CLASSFILES)
docker run --rm --name mfnapijava \
--user $(UID):$(GID) \
-v $(CURDIR):/usr/src/mfnapijava -w /usr/src/mfnapijava \
-v "$(CURDIR)":/usr/src/mfnapijava -w /usr/src/mfnapijava \
openjdk:8-jdk-stretch \
bash -c 'cd target/classes; jar -cvf mfnapi.jar org/microfunctions/mfnapi/*.class; mv mfnapi.jar ../../'

Expand All @@ -41,7 +41,7 @@ src/main/java/org/microfunctions/mfnapi/MicroFunctionsAPIService.java: \
cp ../FunctionWorker/MicroFunctionsAPI.thrift .
docker run --rm -i --name mfnapi-thrift \
--user $(UID):$(GID) \
-v $(CURDIR):/usr/src/mfnapi -w /usr/src/mfnapi \
-v "$(CURDIR)":/usr/src/mfnapi -w /usr/src/mfnapi \
$(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) \
bash -c 'thrift --gen java -out ./src/main/java/ ./MicroFunctionsAPI.thrift'
rm ./MicroFunctionsAPI.thrift
Expand Down Expand Up @@ -72,7 +72,7 @@ target/javaworker.jar: $(JAVA_SOURCES) \
if [ ! -e .m2/repository ]; then mkdir -p .m2/repository; fi
docker run --rm -i --name javaworker \
--user $(UID):$(GID) \
-e HOME=/usr/src/javaworker -v $(CURDIR):/usr/src/javaworker -w /usr/src/javaworker \
-e HOME=/usr/src/javaworker -v "$(CURDIR)":/usr/src/javaworker -w /usr/src/javaworker \
maven:3.6.1-jdk-8 \
mvn -Drevision=$(GIT_REVISION) -Dlibthrift.version=$(MVN_LIBTHRIFT_VERSION) -DargLine="-Duser.home=/tmp" -s /usr/src/javaworker/.m2/settings-docker.xml -e package;

Expand All @@ -83,7 +83,7 @@ target/site/apidocs/index.html: $(JAVA_SOURCES) \
.m2/settings-docker.xml
docker run --rm -i --name javaworker \
--user $(UID):$(GID) \
-e HOME=/usr/src/javaworker -v $(CURDIR):/usr/src/javaworker -w /usr/src/javaworker \
-e HOME=/usr/src/javaworker -v "$(CURDIR)":/usr/src/javaworker -w /usr/src/javaworker \
maven:3.6.1-jdk-8 \
mvn -Drevision=$(GIT_REVISION) -Dlibthrift.version=$(MVN_LIBTHRIFT_VERSION) -DargLine="-Duser.home=/tmp" -s /usr/src/javaworker/.m2/settings-docker.xml -e javadoc:javadoc;

Expand Down
2 changes: 1 addition & 1 deletion LoggingService/fluent-bit-1.2.2/build-fluent-bit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ else
wget --no-check-certificate https://fluentbit.io/releases/1.2/fluent-bit-1.2.2.tar.gz
fi
docker build --build-arg HTTP_PROXY=$HTTP_PROXY --build-arg HTTPS_PROXY=$HTTPS_PROXY --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -t fluent-bit-1.2.2-build .
docker run -i --rm --name fluent-bit-1.2.2-sandbox -v $(pwd):/fluent-bit-build fluent-bit-1.2.2-build /bin/bash -c "cp -r /fluent-bit /fluent-bit-build/. && chmod -R 777 /fluent-bit-build/fluent-bit"
docker run -i --rm --name fluent-bit-1.2.2-sandbox -v "$(pwd)":/fluent-bit-build fluent-bit-1.2.2-build /bin/bash -c "cp -r /fluent-bit /fluent-bit-build/. && chmod -R 777 /fluent-bit-build/fluent-bit"
./package-fluent-bit.sh
2 changes: 1 addition & 1 deletion ManagementService/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ $(THRIFT): ../DataLayerService/thrift/DataLayerMessage.thrift \
../build_tools/thrift/$(THRIFT_VERSION)/build_thrift.sh
cd ../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
mkdir -p data_layer
docker run --user $(UID):$(GID) --rm -v $(CURDIR)/..:/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
docker run --user $(UID):$(GID) --rm -v "$(CURDIR)/..":/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
thrift --gen py -out ManagementService/ DataLayerService/thrift/DataLayerMessage.thrift; \
thrift --gen py -out ManagementService/ DataLayerService/thrift/DataLayerService.thrift'

Expand Down
2 changes: 1 addition & 1 deletion Sandbox/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ build/SandboxAgent.tar.gz: $(SBASOURCE) $(FWSOURCE)
build/FunctionWorker.tar.gz: $(FWSOURCE) ../build_env.mk ../build_tools/thrift/$(THRIFT_VERSION)/build_thrift.sh
cd ../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
mkdir -p build
docker run --user $$(id -u):$$(id -g) --rm -v $$(pwd)/../:/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
docker run --user $$(id -u):$$(id -g) --rm -v "$$(pwd)/../":/root -w /root $(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) bash -c '\
thrift --gen py -out FunctionWorker/python/ DataLayerService/thrift/DataLayerMessage.thrift; \
thrift --gen py -out FunctionWorker/python/ DataLayerService/thrift/DataLayerService.thrift;'
tar -czf $@ ../FunctionWorker
Expand Down
14 changes: 7 additions & 7 deletions Sandbox/frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ datalayermessage: ../../DataLayerService/thrift/DataLayerMessage.thrift ../../bu
cd ../../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
docker run --rm -i --name sandbox-thrift \
--user $(UID):$(GID) \
-v $(CURDIR)/../../DataLayerService:/usr/src/datalayer \
-v $(CURDIR):/usr/src/sandbox -w /usr/src/sandbox \
-v "$(CURDIR)/../../DataLayerService":/usr/src/datalayer \
-v "$(CURDIR)":/usr/src/sandbox -w /usr/src/sandbox \
$(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) \
bash -c 'thrift --gen go:package_prefix=github.com/knix-microfunctions/knix/Sandbox/frontend/ -out ./ /usr/src/datalayer/thrift/DataLayerMessage.thrift'

datalayerservice: ../../DataLayerService/thrift/DataLayerService.thrift ../../build_env.mk ../../build_tools/thrift/$(THRIFT_VERSION)/build_thrift.sh
cd ../../build_tools/thrift/$(THRIFT_VERSION)/; ./build_thrift.sh; cd -
docker run --rm -i --name sandbox-thrift \
--user $(UID):$(GID) \
-v $(CURDIR)/../../DataLayerService:/usr/src/datalayer \
-v $(CURDIR):/usr/src/sandbox -w /usr/src/sandbox \
-v "$(CURDIR)/../../DataLayerService":/usr/src/datalayer \
-v "$(CURDIR)":/usr/src/sandbox -w /usr/src/sandbox \
$(THRIFT_IMAGE_NAME):$(THRIFT_VERSION) \
bash -c 'thrift --gen go:package_prefix=github.com/knix-microfunctions/knix/Sandbox/frontend/ -out ./ /usr/src/datalayer/thrift/DataLayerService.thrift'

Expand All @@ -50,7 +50,7 @@ mfnmessage.go: ../schema/mfnmessage-schema.json
--env http_proxy=$(HTTP_PROXY) \
--env https_proxy=$(HTTPS_PROXY) \
--env XDG_CACHE_HOME=/tmp/.cache \
-v $(CURDIR)/../:/usr/src/sandbox \
-v "$(CURDIR)/../":/usr/src/sandbox \
-w /usr/src/sandbox/frontend \
golang:1.13 \
bash -c 'go get github.com/a-h/generate/...; schema-generate $^ > $@'
Expand All @@ -60,7 +60,7 @@ mfnmessage.go: ../schema/mfnmessage-schema.json
# --user $(UID):$(GID) \
# --env http_proxy=$(HTTP_PROXY) \
# --env https_proxy=$(HTTPS_PROXY) \
# -v $(CURDIR)/../:/usr/src/sandbox \
# -v "$(CURDIR)/../":/usr/src/sandbox \
# -w /usr/src/sandbox/frontend \
# golang:1.13 \
# bash -c 'go get github.com/a-h/generate/...; schema-generate $^ > $@'
Expand All @@ -72,7 +72,7 @@ frontend: mfnmessage.go promstats.go datalayermessage datalayerservice $(SOURCES
--env http_proxy=$(HTTP_PROXY) \
--env https_proxy=$(HTTPS_PROXY) \
--env XDG_CACHE_HOME=/tmp/.cache \
-v $(CURDIR):/app \
-v "$(CURDIR)":/app \
-w /app \
golang:1.14 \
bash -c 'go mod download; CGO_ENABLED=0 GOOS=linux go build -v -o $@'
Expand Down
2 changes: 1 addition & 1 deletion TriggersFrontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUST_SOURCES=$(shell find src/ -type f)
target/release/TriggersFrontend: $(RUST_SOURCES) Cargo.toml ../build_env.mk
docker run --rm --name build_triggers_frontend \
--user $(UID):$(GID) \
-v $(CURDIR):/code -w /code \
-v "$(CURDIR)":/code -w /code \
-e http_proxy \
-e https_proxy \
$(RUST_IMAGE_NAME):$(RUST_VERSION) bash -c 'cargo build --release'
Expand Down
2 changes: 1 addition & 1 deletion TriggersFrontend/scripts/run_local_mqttpublisher.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run -it --rm --network host --name mqttpublisher -v $(pwd):/code -w /code python:3.6 bash -c './mqttpublisher.sh'
docker run -it --rm --network host --name mqttpublisher -v "$(pwd)":/code -w /code python:3.6 bash -c './mqttpublisher.sh'
2 changes: 1 addition & 1 deletion TriggersFrontend/scripts/run_local_mqttsubscriber.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run -it --rm --network host --name mqttsubscriber -v $(pwd):/code -w /code python:3.6 bash -c './mqttsubscriber.sh'
docker run -it --rm --network host --name mqttsubscriber -v "$(pwd)":/code -w /code python:3.6 bash -c './mqttsubscriber.sh'
2 changes: 1 addition & 1 deletion TriggersFrontend/scripts/run_local_publisher.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run -it --rm --network host --name rabbitpublisher -v $(pwd):/code -w /code python:3.6 bash -c './publisher.sh'
docker run -it --rm --network host --name rabbitpublisher -v "$(pwd)":/code -w /code python:3.6 bash -c './publisher.sh'
2 changes: 1 addition & 1 deletion TriggersFrontend/scripts/run_local_subscriber.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run -it --rm --network host --name rabbitsubscriber -v $(pwd):/code -w /code python:3.6 bash -c './subscriber.sh'
docker run -it --rm --network host --name rabbitsubscriber -v "$(pwd)":/code -w /code python:3.6 bash -c './subscriber.sh'
2 changes: 1 addition & 1 deletion deploy/ansible/management.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
python3 management_init.py start
END
chmod 775 dockerrun.sh
docker run -it --rm --network host --ulimit nofile=262144:262144 --env-file .management -v $(pwd):/code -w /code python:3.6 bash -c './dockerrun.sh'
docker run -it --rm --network host --ulimit nofile=262144:262144 --env-file .management -v "$(pwd)":/code -w /code python:3.6 bash -c './dockerrun.sh'
rm dockerrun.sh
[ "$(docker ps | grep Management)" ] && docker stop Management || true
[ "$(docker ps -a | grep Management)" ] && docker rm Management || true
Expand Down
2 changes: 1 addition & 1 deletion deploy/ansible/sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
python3 available_hosts.py add
END
chmod 775 dockerrun.sh
docker run -i --rm --network host --ulimit nofile=262144:262144 --env-file .env -v $(pwd):/code -w /code python:3.6 bash -c './dockerrun.sh'
docker run -i --rm --network host --ulimit nofile=262144:262144 --env-file .env -v "$(pwd)":/code -w /code python:3.6 bash -c './dockerrun.sh'
rm dockerrun.sh
cd -
mode: '0775'
Expand Down
2 changes: 1 addition & 1 deletion redis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ redis-server: Dockerfile_redis_build Makefile
echo "Building redis server"
mkdir -p redis-server
$(call build_image,Dockerfile_redis_build,redis_local_queue)
docker run -i --rm -u $$(id -u):$$(id -g) -v $(CURDIR):/temp -w /temp --ulimit nofile=262144:262144 redis_local_queue:$(VERSION) cp /build/redis/src/redis-server redis-server/.
docker run -i --rm -u $$(id -u):$$(id -g) -v "$(CURDIR)":/temp -w /temp --ulimit nofile=262144:262144 redis_local_queue:$(VERSION) cp /build/redis/src/redis-server redis-server/.
echo "appendonly no" > redis-server/redis_sock.conf
echo "save \"\"" >> redis-server/redis_sock.conf
echo "port 0" >> redis-server/redis_sock.conf
Expand Down
2 changes: 1 addition & 1 deletion riak/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ lib/jiffy.tgz: Dockerfile
mkdir -p lib
echo "Building jiffy"
$(call build_image,Dockerfile,riak_libs_build)
docker run -i --rm -u $$(id -u):$$(id -g) -v $(CURDIR):/temp -w /temp --ulimit nofile=262144:262144 riak_libs_build:$(VERSION) cp /build/jiffy.tgz ./lib/.
docker run -i --rm -u $$(id -u):$$(id -g) -v "$(CURDIR)":/temp -w /temp --ulimit nofile=262144:262144 riak_libs_build:$(VERSION) cp /build/jiffy.tgz ./lib/.

image: Dockerfile-riak \
lib/jiffy.tgz \
Expand Down
2 changes: 1 addition & 1 deletion riak/src/python_client/run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
docker run -it --rm --network host --ulimit nofile=262144:262144 -v $(pwd):/code -w /code python:3.6 bash -c './dockerrun.sh'
docker run -it --rm --network host --ulimit nofile=262144:262144 -v "$(pwd)":/code -w /code python:3.6 bash -c './dockerrun.sh'
2 changes: 1 addition & 1 deletion tests/triggers_amqp/scripts/run_local_publisher.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
./scripts/wait-for-it.sh $(hostname):5672 -t 30
docker run -d --rm --network host --name rabbitpublisher -v $(pwd):/code -w /code python:3.6 bash -c './scripts/publisher.sh'
docker run -d --rm --network host --name rabbitpublisher -v "$(pwd)":/code -w /code python:3.6 bash -c './scripts/publisher.sh'
2 changes: 1 addition & 1 deletion tests/triggers_amqp/scripts/run_local_subscriber.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
./scripts/wait-for-it.sh $(hostname):5672 -t 30
docker run -it --rm --network host --name rabbitsubscriber -v $(pwd):/code -w /code python:3.6 bash -c './scripts/subscriber.sh'
docker run -it --rm --network host --name rabbitsubscriber -v "$(pwd)":/code -w /code python:3.6 bash -c './scripts/subscriber.sh'
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
./scripts/wait-for-it.sh $(hostname):5672 -t 30
docker run -d --rm --network host --name rabbitpublisher -v $(pwd):/code -w /code python:3.6 bash -c './scripts/publisher.sh'
docker run -d --rm --network host --name rabbitpublisher -v "$(pwd)":/code -w /code python:3.6 bash -c './scripts/publisher.sh'
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
./scripts/wait-for-it.sh $(hostname):5672 -t 30
docker run -it --rm --network host --name rabbitsubscriber -v $(pwd):/code -w /code python:3.6 bash -c './scripts/subscriber.sh'
docker run -it --rm --network host --name rabbitsubscriber -v "$(pwd)":/code -w /code python:3.6 bash -c './scripts/subscriber.sh'
6 changes: 3 additions & 3 deletions tutorials/KNIX-General-Tutorial/resize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Python Imaging Library (`pillow`) needs to packaged along with the function code
cd resize

# install pillow alongside user function
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 pip3 install pillow -t .
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 pip3 install pillow -t .

# create zip package
zip -r ../resize.zip .
Expand All @@ -42,8 +42,8 @@ python3 request.py leaves.jpg

```bash
# install pillow alongside user function
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 pip3 install pillow -t .
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 pip3 install pillow -t .

# invoke the test script inside a python3.6 docker container
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 python3 test_local.py
docker run -it --rm -e https_proxy=${http_proxy} -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 python3 test_local.py
```
2 changes: 1 addition & 1 deletion tutorials/KNIX-General-Tutorial/resize/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# pre-requisite (PIL module should be downloaded in the current folder)
# pip3 install pillow -t .
# OR
# docker run -it --rm -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 pip3 install pillow -t .
# docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 pip3 install pillow -t .
# zip -r ../resize.zip .

def handle(event, context):
Expand Down
4 changes: 2 additions & 2 deletions tutorials/KNIX-General-Tutorial/resize/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

# Script for locally testing the resize function
# pre-requisite (PIL module should be downloaded in the current folder)
# docker run -it --rm -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 pip3 install pillow -t .
# docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 pip3 install pillow -t .
#
# run as:
# docker run -it --rm -u $(id -u):$(id -g) -v $(pwd):/temp -w /temp python:3.6 python3 test_local.py
# docker run -it --rm -u $(id -u):$(id -g) -v "$(pwd)":/temp -w /temp python:3.6 python3 test_local.py

import json, base64

Expand Down