Skip to content

Use Container.Config.Shell instead of hardcoded…#28438

Merged
vieux merged 1 commit intomoby:masterfrom
vdemeester:use-container-shell-instead-of-hardcoded
Nov 19, 2016
Merged

Use Container.Config.Shell instead of hardcoded…#28438
vieux merged 1 commit intomoby:masterfrom
vdemeester:use-container-shell-instead-of-hardcoded

Conversation

@vdemeester
Copy link
Copy Markdown
Member

… for healthcheck. It make the code a little cleaner and more future/usage proof. Hopefully it's all green 👼

/cc @justincormack @talex5 @thaJeztah @cpuguy83

🐸

Signed-off-by: Vincent Demeester [email protected]

Comment thread daemon/health.go Outdated
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is duplicated with builder/dockerfile/builder_unix.go (and its windows counter-part), we might want to extract that 👼

Comment thread daemon/health.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't much care for this random getShell function in the daemon package.
Maybe Shell() on Config would be better.

Also, what if Shell is supposed to be empty?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hum I like the idea of Shell() method on Config 👼
Right now Shell is only used while building to set the right Entrypoint — it's not used during runtime. If Shell is empty, it means it has not be set and thus we should use the default behavior (i.e. either Container.Entypoint or the current values).

@vdemeester vdemeester force-pushed the use-container-shell-instead-of-hardcoded branch 3 times, most recently from 54901e9 to b9ac5b2 Compare November 15, 2016 16:26
… for healthcheck. It make the code a little cleaner and more
future/usage proof.

Signed-off-by: Vincent Demeester <[email protected]>
@vdemeester vdemeester force-pushed the use-container-shell-instead-of-hardcoded branch from b9ac5b2 to 5f81cf1 Compare November 15, 2016 16:53
@crosbymichael
Copy link
Copy Markdown
Contributor

LGTM

1 similar comment
@vieux
Copy link
Copy Markdown
Contributor

vieux commented Nov 19, 2016

LGTM

@vieux vieux merged commit f6f6789 into moby:master Nov 19, 2016
@vdemeester vdemeester deleted the use-container-shell-instead-of-hardcoded branch November 19, 2016 09:51
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.

5 participants