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

Onbuild command #66

Merged
merged 3 commits into from
Apr 12, 2018
Merged

Conversation

priyawadhwa
Copy link
Collaborator

@priyawadhwa priyawadhwa commented Apr 5, 2018

Onbuild runs any "onbuild" commands in the base image, and updates the config if there are any onbuild commands in the current image

fixes #15

func (o *OnBuildCommand) ExecuteCommand(config *manifest.Schema2Config) error {
logrus.Info("cmd: ONBUILD")
logrus.Infof("args: %s", o.cmd.Expression)
resolvedExpression, err := util.ResolveEnvironmentReplacement(o.cmd.Expression, config.Env, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should make sure the user doesn't try an ONBUILD ONBUILD. Documentation says to not allow FROM either.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Looks like the dockerfile parser handles both of those cases & returns an error for us

@priyawadhwa priyawadhwa merged commit 2e38a21 into GoogleContainerTools:master Apr 12, 2018
@priyawadhwa priyawadhwa deleted the onbuild branch April 12, 2018 17:08
@priyawadhwa priyawadhwa added the area/dockerfile-command For all bugs related to dockerfile file commands label Feb 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dockerfile-command For all bugs related to dockerfile file commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement ONBUILD command
2 participants