Use LAMBDA_REMOVE_CONTAINERS set to false instead of a custom image

master
Baptiste Bouchereau 2020-05-18 14:58:32 +02:00
rodzic 4c09a1b78b
commit 45687e1dfa
3 zmienionych plików z 2 dodań i 20 usunięć

Wyświetl plik

@ -13,8 +13,7 @@ volumes:
services:
localstack:
build:
context: localstack
image: localstack/localstack:0.10.8
container_name: localstack
ports:
- 8080:8080 # webui
@ -27,6 +26,7 @@ services:
- PORT_WEB_UI=8080
- SERVICES=lambda,dynamodb
- LAMBDA_DOCKER_NETWORK=localstack-tutorial
- LAMBDA_REMOVE_CONTAINERS=false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- localstack:/tmp/localstack/data

Wyświetl plik

@ -1,5 +0,0 @@
FROM localstack/localstack:0.10.7
# Update localstack code to prevent the destruction of the lambda containers every 10 minutes
COPY localstack.patch /opt/code/localstack/localstack.patch
RUN apk add git && git apply localstack.patch && apk del --purge git

Wyświetl plik

@ -1,13 +0,0 @@
diff --git a/localstack/services/awslambda/lambda_executors.py b/localstack/services/awslambda/lambda_executors.py
index 19f1e07..85d4781 100644
--- a/localstack/services/awslambda/lambda_executors.py
+++ b/localstack/services/awslambda/lambda_executors.py
@@ -301,7 +301,7 @@ class LambdaExecutorReuseContainers(LambdaExecutorContainers):
def startup(self):
self.cleanup()
# start a process to remove idle containers
- self.start_idle_container_destroyer_interval()
+ # self.start_idle_container_destroyer_interval()
def cleanup(self, arn=None):
if arn: