Not able to access init.sh file in docker

55 views Asked by At

I am running localstack in docker container and in localstack docker container i have a init-aws.sh file at /etc/localstack/init/ready.d/ location with executable permissions. but while runnning app i am getting this error in container logs :

[  MainThread] localstack.runtime.init    : Error while running script Script(path='/etc/localstack/init/ready.d/init-aws.sh', stage=READY, state=ERROR): [Errno 2] No such file or directory: '/etc/localstack/init/ready.d/init-aws.sh'

You can see file permissions here in SS : enter image description here

I also tried to execute file in container and here is output : enter image description here

I am not sure what's wrong with this file. Any help will be appreciated.

Docker file :

services:
  test-localstack:
      container_name: test-localstack
      image: localstack/localstack
      ports:
          - '4566:4566' # LocalStack Gateway
          - '4510-4559:4510-4559' # external services port range
      environment:
          - DEBUG=${DEBUG-}
          - DOCKER_HOST=unix:///var/run/docker.sock
      volumes:
          - './localstack/init.sh:/etc/localstack/init/ready.d/init-aws.sh'
          - '${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack'
          - '/var/run/docker.sock:/var/run/docker.sock'
0

There are 0 answers