@@ -3,6 +3,8 @@ VENV_DIR = .venv
33VENV_RUN = . $(VENV_DIR ) /bin/activate
44AWS_STS_URL = http://central.maven.org/maven2/com/amazonaws/aws-java-sdk-sts/1.11.14/aws-java-sdk-sts-1.11.14.jar
55AWS_STS_TMPFILE = /tmp/aws-java-sdk-sts.jar
6+ TMP_DIR = /tmp/localstack
7+ DOCKER_SOCK ?= /var/run/docker.sock
68
79usage : # # Show this help
810 @fgrep -h " ##" $(MAKEFILE_LIST ) | fgrep -v fgrep | sed -e ' s/\\$$//' | sed -e ' s/##//'
@@ -57,7 +59,8 @@ docker-push: ## Push Docker image to registry
5759
5860docker-run : # # Run Docker image locally
5961 port_mappings=" $( shell echo $( SERVICES) | sed ' s/[^0-9]/ /g' | sed ' s/\([0-9][0-9]*\)/-p \1:\1/g' | sed ' s/ */ /g' ) " ; \
60- docker run -it -e DEBUG=$(DEBUG ) -e SERVICES=$(SERVICES ) -e KINESIS_ERROR_PROBABILITY=$(KINESIS_ERROR_PROBABILITY ) -p 4567-4581:4567-4581 -p 8080:8080 $$ port_mappings $(IMAGE_NAME )
62+ mkdir -p $(TMP_DIR ) ; \
63+ docker run -it $(ENTRYPOINT ) -e DEBUG=$(DEBUG ) -e SERVICES=$(SERVICES ) -e LAMDA_EXECUTOR=$(LAMDA_EXECUTOR ) -e KINESIS_ERROR_PROBABILITY=$(KINESIS_ERROR_PROBABILITY ) -p 4567-4581:4567-4581 -p 8080:8080 $$ port_mappings -v $(TMP_DIR ) :$(TMP_DIR ) -v $(DOCKER_SOCK ) :$(DOCKER_SOCK ) -e DOCKER_HOST=" unix://$( DOCKER_SOCK) " $(IMAGE_NAME ) $(CMD )
6164
6265web : # # Start web application (dashboard)
6366 ($( VENV_RUN) ; bin/localstack web --port=8080)
@@ -66,6 +69,9 @@ test: ## Run automated tests
6669 make lint && \
6770 $(VENV_RUN ) ; DEBUG=$(DEBUG ) PYTHONPATH=` pwd` nosetests --with-coverage --logging-level=WARNING --nocapture --no-skip --exe --cover-erase --cover-tests --cover-inclusive --cover-package=localstack --with-xunit --exclude=' $(VENV_DIR).*' .
6871
72+ test-docker : # # Run automated tests in Docker
73+ ENTRYPOINT=" --entrypoint= -v ` pwd` /localstack:/opt/code/localstack/localstack" CMD=" make test" make docker-run
74+
6975lint : # # Run code linter to check code style
7076 ($( VENV_RUN) ; pep8 --max-line-length=120 --ignore=E128 --exclude=node_modules,legacy,$( VENV_DIR) ,dist .)
7177
0 commit comments