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

Set Init=true by default on container create #40770

Closed
wants to merge 1 commit into from

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented Apr 3, 2020

This means any new containers, unless explicitly specified, created with
API version 1.41 will have init enabled by default. This default can be
controlled by the daemon-level --init setting.

This means any new containers, unless explicitly specified, created with
API version 1.41 will have init enabled by default. This default can be
controlled by the daemon-level `--init` setting.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@AkihiroSuda
Copy link
Member

I feel this is too much "brave". This is likely to break containers with non-tini init.

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, NOTLGTM

@cpuguy83
Copy link
Member Author

cpuguy83 commented Apr 6, 2020

I understand it is pretty brave.
How can we get to a point where we can provide a better and much more correct default container implementation?

Note that this does not change existing containers and only affects clients using the new API version. Also able to change this based on the value set in the daemon config.
Maybe we could have an exclusion list of some sort as well? Default could have strings.HasPrefix(cmd, "/sbin/init"), but make it configurable?

Given that we are not releasing a new version of Docker every quarter like we used to, I wonder if we can go ahead and make changes like this and make sure it's well documented in the release notes.

@tao12345666333
Copy link
Contributor

Changes in the default behavior may cause confusion, or under certain circumstances will break the working logic of some containers.(may be some specific hack)

But I think we should move forward.

+1 for this change.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's the right move.

LGTM (except this needs a rebase -- @cpuguy83)

@AkihiroSuda
Copy link
Member

I think this should be enabled only if the image has LABEL=com.docker.image.default.init=true

@cpuguy83
Copy link
Member Author

cpuguy83 commented Jul 5, 2023

This seems too controversial so closing.

@cpuguy83 cpuguy83 closed this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants