Localstack initialization hooks with from volumes

Hello,

I am running localstack as docker container and locally I can paste an init.sh script into /etc/localstack/init/ready.d directory and it works fine. The infrastructure is set up successfully.

But now I have another setup. I have a data container, where my configuration is mounted on path /test/pathA/localstack/init.sh. When I try to mount the init.sh script from a volume (volume from) it mounts the volumes on the path, which is specified in the data container. (/test/pathA/localstack) but not /etc/localstack/init/ready.d. With the variable INIT_SCRIPTS_PATH it was possible to specify an alternative path, where the init scripts are located but without each data container has to expose volumes from (/etc/localstack) directory. And this is a problem, because I have no rights to write to this directory.

Hey Richard! Thanks for the feedback. We’ve removed the configurability of certain directories in LocalStack and instead use conventions, this includes /etc/localstack and the init script hooks. We currently don’t plan to make these directories configurable, since it has caused more problems in the past than it solved. Sorry!

All I can suggest right now, if the volume from feature doesn’t work for you, is to use bind mounts and share the directory between the containers through the host. Maybe docker cp is also an option?

thank you for your answer. Unfortunately it is not an option. I have a docker-in-docker problem and I am forced to use data containers.

I managed it with an own custom entrypoint.sh script. :slight_smile:
Issue can be closed