localstack / serverless-localstack

⚡ Serverless plugin for running against LocalStack
511 stars 82 forks source link

[Question] Docker-in-Docker push to localstack #192

Open ptrhck opened 1 year ago

ptrhck commented 1 year ago

I have deployed a lambda function with a container image to localstack using this plugin. With host: http://localstack, the deploy command worked perfectly, even from within a docker container (VSCode devcontainer). Can you explain how this is possible? Because if I do a docker push localstack:4510/X from that container that is in the same network, that would not work. Only outside the container with localhost.

steffyP commented 8 months ago

Hi @ptrhck, apologies for the late reply. Could you please explain a little more what exactly you are referring to? It seems like you used a docker-compose with one container running the serverless-deployment, and the other is running localstack?

This is more a docker-network configuration, and has not so much to do with LocalStack.

if I do a docker push localstack:4510/X from that container that container that is in the same network

I assume you mean that you worked with an ECR, that you have created on LocalStack? From which container you are trying to run this? If it is the localstack container, that it may not be able to resolve the service-name.