gpt4 book ai didi

docker - localstack docker 给出错误权限被拒绝 : '/tmp/localstack/server.test.pem.key'

转载 作者:行者123 更新时间:2023-12-02 18:13:16 26 4
gpt4 key购买 nike

在我的 ubuntu 18 机器上,我无法运行 localstack 的最新 docker 镜像。
即使结束消息显示为“就绪”,我仍然无法使用以下命令访问它。

awslocal --endpoint-url=http://localhost:4575 sns list-topics

Could not connect to the endpoint URL: "http://localhost:4575/"

docker run localstack/localstack 也显示错误:
[Errno 13] 权限被拒绝:'/tmp/localstack/server.test.pem.key'
docker run localstack/localstack  

Waiting for all LocalStack services to be ready
2020-04-09 04:28:19,502 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
2020-04-09 04:28:19,504 INFO supervisord started with pid 13
2020-04-09 04:28:20,509 INFO spawned: 'dashboard' with pid 19
2020-04-09 04:28:20,511 INFO spawned: 'infra' with pid 20
(. .venv/bin/activate; bin/localstack web)
2020-04-09 04:28:20,515 INFO success: dashboard entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
(. .venv/bin/activate; exec bin/localstack start --host)
Starting local dev environment. CTRL-C to quit.
2020-04-09 04:28:21,877 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-04-09T04:28:25:INFO:localstack.utils.common: Unable to store key/cert files for custom SSL certificate: [Errno 13] Permission denied: '/tmp/localstack/server.test.pem.key'
!WARNING! - Looks like you have configured $LAMBDA_REMOTE_DOCKER=1 - please make sure to configure $HOST_TMP_FOLDER to point to your host's $TMPDIR
Starting edge router (http port 4566)...
Starting edge router (https port 443)...
Starting mock API Gateway (http port 4567)...
2020-04-09T04:28:25:INFO:localstack.multiserver: Starting multi API server process on port 51492
Waiting for all LocalStack services to be ready
Starting mock CloudFormation (http port 4581)...
Starting mock CloudWatch (http port 4582)...
Starting mock DynamoDB (http port 4569)...
Starting mock DynamoDB Streams service (http port 4570)...
Starting mock EC2 (http port 4597)...
Starting mock ES service (http port 4578)...
Starting mock Firehose service (http port 4573)...
Starting mock IAM (http port 4593)...
Starting mock Kinesis (http port 4568)...
Starting mock KMS (http port 4599)...
Starting mock Lambda service (http port 4574)...
Starting mock CloudWatch Logs (http port 4586)...
Starting mock Redshift (http port 4577)...
Starting mock Route53 (http port 4580)...
Starting mock S3 (http port 4572)...
Starting mock Secrets Manager (http port 4584)...
Starting mock SES (http port 4579)...
Starting mock SNS (http port 4575)...
Starting mock SQS (http port 4576)...
Starting mock SSM (http port 4583)...
Starting mock STS (http port 4592)...
Starting mock Cloudwatch Events (http port 4587)...
Starting mock StepFunctions (http port 4585)...
Ready.

最佳答案

您应该授予 localstack 进程写入权限 tmp文件夹。

将这些行添加到 localstack 的 docker-compose.yml文件:

   tmpfs:
- /tmp/localstack:exec,mode=600

如本例所示:
version: '3.7'
services:
localstack:
image: localstack/localstack
container_name: localstack
ports:
- "4574:4574"
environment:
- SERVICES=lambda
- LAMBDA_EXECUTOR=docker
- DOCKER_HOST=unix:///var/run/docker.sock
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
tmpfs:
- /tmp/localstack:exec,mode=600

哪里 mode=600chmod 的八进制模式允许读写。

关于docker - localstack docker 给出错误权限被拒绝 : '/tmp/localstack/server.test.pem.key' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61114110/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com