Skip to content

Allow custom project-specific entrypoint #4

@michaelbaudino

Description

@michaelbaudino

As suggested by @GCorbel (thanks 🎩), we could allow the user to execute some project-specific shell script (some beloved shell aliases, for example) before any command run in the container.

It could be a new very simple entrypoint like that:

#!/bin/bash

CUSTOM_ENTYRYPOINT="/app/.entrypoint-additions.sh"

[ -x "${CUSTOM_ENTYPOINT}" ] && . "${CUSTOM_ENTRYPOINT}"

exec "$@"

It would let users have a .entrypoint-additions.sh script in their project root with commands to execute after the image default entrypoint(s).

It should not be used for cpu- or network-intensive commands, though (like apt-get install or gem install), otherwise I guarantee that users will go insane soon (it's executed before every command, even to start a shell).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions