[我正在使用MACOSX来运行和测试我的某些服务,也在使用localstack(https://github.com/localstack/localstack)来模仿s3,sqs和sns,但这似乎无法正常工作。
我已经将docker的计算能力和内存提高到最大。
C-LM-0792:Desktop UserName$ git clone [email protected]:localstack/localstack.git
Cloning into 'localstack'...
Enter passphrase for key '/Users/UserName/.ssh/id_rsa':
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 6741 (delta 0), reused 4 (delta 0), pack-reused 6726
Receiving objects: 100% (6741/6741), 2.23 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (4397/4397), done.
C-LM-0792:Desktop UserName$ cd localstack/
C-LM-0792:localstack UserName$ make infra
(. .venv/bin/activate; exec bin/localstack start)
/bin/sh: .venv/bin/activate: No such file or directory
make: *** [infra] Error 1
C-LM-0792:localstack UserName$ make web
(. .venv/bin/activate; bin/localstack web)
/bin/sh: .venv/bin/activate: No such file or directory
make: *** [web] Error 1
您可以使用@brian在注释中指向的以下docker-compose文件:
version: '2.1'
services:
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}"
image: localstack/localstack
ports:
- "4567-4599:4567-4599"
- "${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}"
environment:
- SERVICES=${SERVICES- }
- DEBUG=${DEBUG- }
- DATA_DIR=${DATA_DIR- }
- PORT_WEB_UI=${PORT_WEB_UI- }
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR- }
- KINESIS_ERROR_PROBABILITY=${KINESIS_ERROR_PROBABILITY- }
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "${TMPDIR:-/tmp/localstack}:/tmp/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"