Content-Length: 236118 | pFad | http://github.com/localstack/localstack/issues/12618

55 bug: Volume Mount Creates Directory Instead of File for Init Hook Script · Issue #12618 · localstack/localstack · GitHub
Skip to content

bug: Volume Mount Creates Directory Instead of File for Init Hook Script #12618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
vishnusureshperumbavoor opened this issue May 14, 2025 · 1 comment
Open
1 task done
Labels
area: docker Use Docker with LocalStack status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@vishnusureshperumbavoor
Copy link

vishnusureshperumbavoor commented May 14, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When attempting to mount a shell script (init-aws.sh) as a volume to /etc/localstack/init/ready.d/init-aws.sh within the LocalStack container (as per the official documentation), Docker creates a directory named init-aws.sh instead of a file.

Image

Expected Behavior

The init-aws.sh script should be successfully mounted into the LocalStack container and executed during startup. This should result in the creation of an S3 bucket and a DynamoDB table as defined in the script.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

  1. Folder structure
localstack
     |_________init-aws.sh
docker-compose.yml
  1. Run executable command as per documentation
cd localstack
chmod +x init-aws.sh
  1. Add the following code in init-aws.sh file
#!/bin/bash

export AWS_ACCESS_KEY_ID=000000000000 AWS_SECRET_ACCESS_KEY=000000000000

awslocal s3 mb s3://my-bucket
awslocal sqs create-queue --queue-name my-queue
  1. Add following code in docker-compose.yml
services:
 localstack:
   container_name: "localstack-main"
   image: localstack/localstack
   ports:
     - "127.0.0.1:4566:4566"
   environment:
     - DEBUG=1
   volumes:
     - "/localstack/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh" 
     - "./volume:/var/lib/localstack"
     - "/var/run/docker.sock:/var/run/docker.sock"
  1. Run docker-compose up
  2. Inspect the contents of /etc/localstack/init/ready.d inside the running LocalStack container (e.g., using docker exec -it localstack-main ls -l /etc/localstack/init/ready.d). You will observe that init-aws.sh is a directory, not a file.

Environment

- OS: Ubuntu 22.04.5
- LocalStack:
  LocalStack version: 4.4.1.dev13
  LocalStack Docker image sha: sha256:77bb976657d31a9da577b287909dab12dc412a2d7af218caf915be71ab931773
  LocalStack build date: 2025-05-14
  LocalStack build git hash: 9b6ef35c7

Anything else?

No response

@vishnusureshperumbavoor vishnusureshperumbavoor added type: bug Bug report status: triage needed Requires evaluation by maintainers labels May 14, 2025
@localstack-bot
Copy link
Collaborator

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Support if you are a licensed user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines.

@Anze1508 Anze1508 added area: docker Use Docker with LocalStack status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: docker Use Docker with LocalStack status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

No branches or pull requests

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/localstack/localstack/issues/12618

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy