Skip to content

Commit 42c9a17

Browse files
authored
Improve the makefile setup (#1597)
* Remove containers when stopping them This ensures that starting the setup again picks up the new version of the image during the next run. * Clean docker setups in components The components should be pulling the images they launch and not a different tag. And they should not try to start the shared localstack container when the image they use is not localstack. Instead, the should check for the shared container created by the root Makefile * Clean all docker images of the root Makefile * Change the root Makefile to be consistent with services Instead of having `make stop-docker` triggering the `clean` command (which also triggers the cleaning of sub-services), it is now `clean` which depends on `stop-docker` of the root repo. This brings consistency with initialization commands. We now have a symmetry between `initialize`/`clean` and `start-docker`/`stop-docker`.
1 parent 698eb3b commit 42c9a17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
55
initialize: start-docker
66
start-docker:
77
docker start async_aws_lambda && exit 0 || \
8-
docker pull lambci/lambda && \
8+
docker pull lambci/lambda:nodejs12.x && \
99
docker run -d -p 9001:9001 -e DOCKER_LAMBDA_STAY_OPEN=1 -v "$(ROOT_DIR)/tests/fixtures/lambda":/var/task:ro,delegated --name async_aws_lambda lambci/lambda:nodejs12.x index.handler
1010

1111
test: initialize
@@ -14,3 +14,4 @@ test: initialize
1414
clean: stop-docker
1515
stop-docker:
1616
docker stop async_aws_lambda || true
17+
docker rm async_aws_lambda || true

0 commit comments

Comments
 (0)