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

docker-outside-of-docker feature wrongly update container entrypoint #954

Open
cirolosapio opened this issue Apr 23, 2024 · 1 comment
Open

Comments

@cirolosapio
Copy link

in a dev container with compose.yml that use docker-outside-of docker feature it updates the main entrypoint which is not the expected result

with feature enabled

docker inspect --format='{{.Config.Entrypoint}}'  <container>
[
  [/bin/sh -c echo Container started
  trap "exit 0" 15
  /usr/local/share/docker-init.sh
  exec "$@"
  while sleep 1 & wait $!; do :; done - /usr/local/share/docker-init.sh
]

without feature enabled

docker inspect --format='{{.Config.Entrypoint}}'  <container>
[
  [/bin/sh -c echo Container started
  trap "exit 0" 15
  
  exec "$@"
  while sleep 1 & wait $!; do :; done - /usr/local/share/docker-init.sh
]

Solution
use the postStartCommand instead

Additional info
maybe #483 it's related

@samruddhikhandale
Copy link
Member

Hi 👋

Historically, for initializing docker, we have intentionally used the main entrypoint for docker-in-docker and docker-outside-of-docker Features. Using the entrypoint has the perk of starting the initializing process in the background as well as this is the suggested approach by Moby.

Let's keep this issue open for more feedbacks from the community, thanks for bringing this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants