Localstack / localstack启动麻烦

问题描述 投票:0回答:2

[我正在使用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
amazon-web-services docker makefile docker-compose localstack
2个回答
0
投票

您可以使用@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"

0
投票

在Commandeer中,您可以查看您的LocalStack实例。在后台,它使用上面的docker实例,但是您可以从GUI启动和停止服务。它还在终端选项卡中打印出终端的内容。我会选择码头工人路线,因为现在这是他们推荐的方式。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.