Skip to content

docker-entrypoint.sh ignoring my init scripts #193

@tommyp1ckles

Description

@tommyp1ckles

My project directory looks like:

.
├── Dockerfile
├── docker-entrypoint-initdb.d
│   └── init-user-db.sh
└── test.sh

However the for f in /docker-entrypoint-initdb.d/*; do step in the docker-entrypoint.sh file seems to be incorrectly iterating over the contents of docker-entrypoint-initdb.d.

I ran a little test script:

# This works
for f in docker-entrypoint-initdb.d/*; do
        echo "$f"
done
echo "---"
# This is in docker-entrypoint.sh
for f in /docker-entrypoint-initdb.d/*; do
        echo "$f"
done

which gives me:

docker-entrypoint-initdb.d/init-user-db.sh

---
/docker-entrypoint-initdb.d/*

I'm not great with bash scripts, anyone know whats going on here or is this a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions