Skip to content
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

Allow appending commands to Dockerfile's CMD/ENTRYPOINT from Docker-Compose and Docker Run #44849

Open
ehawman opened this issue Jan 18, 2023 · 0 comments
Labels
kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny status/0-triage

Comments

@ehawman
Copy link

ehawman commented Jan 18, 2023

Description

Please see docker/compose#3140.

Currently, putting anything in entrypoint for docker-compose.yml will result in the Dockerfile entries for both CMD and ENTRYPOINT being discarded.

The community consensus in the referenced issue is that we would like the ability to append commands before/after CMD or ENTRYPOINT inside docker-compose.yml. I believe the cleanest solution would be to expose the original CMD or ENTRYPOINT as variables for docker-compose to use.

entrypoint: ./wait-for-it.sh -t 60 --strict mydb:3306 && sh -c $DOCKERFILE_CMD

I'm not 100% sure if a similar solution would slot nicely into Docker Run, given that different shells may use different variable syntax.

Perhaps some another arg, --entrypoint-behavior="before" (after, overwrite) would add the functionality without breaking existing flows.

Is this the correct project to host this discussion?

@ehawman ehawman added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny status/0-triage labels Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny status/0-triage
Projects
None yet
Development

No branches or pull requests

1 participant