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

chore: make sure directives are correct #235

Closed
wants to merge 3 commits into from

Conversation

BrunoQuaresma
Copy link
Contributor

Closes #217

@BrunoQuaresma BrunoQuaresma self-assigned this Jun 12, 2024
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

I verified the behaviour is correct 👍
Do we need to modify these directives if we are not pushing the image?

@BrunoQuaresma
Copy link
Contributor Author

@johnstcn Good question, from what I can see on #217 we should not. I'm going to submit a fix.

Comment on lines +1394 to +1396
require.Equal(t, configFile.Config.User, "root", "value does not match any of the possible root user values.")
require.Equal(t, configFile.Config.WorkingDir, "/", "expected image to have root working directory")
require.Equal(t, configFile.Config.Entrypoint, []string{"/.envbuilder/bin/envbuilder"}, "expected image to have envbuilder entrypoint")
Copy link
Member

Choose a reason for hiding this comment

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

probably a good idea to assert the opposite in some other test when we don't push

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If they are not pushed, what reference can we use to get the local image and inspect it?

@@ -342,6 +342,14 @@ func Run(ctx context.Context, options Options) error {
}
}

if options.PushImage {
// Make sure the Dockerfile is using the correct directives to run envbuilder
buildParams.DockerfileContent = buildParams.DockerfileContent + "\n" +
Copy link
Member

Choose a reason for hiding this comment

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

I guess that you'll have a merge conflict with the other PR: #216

integration/integration_test.go Show resolved Hide resolved
@BrunoQuaresma
Copy link
Contributor Author

This is blocked by #216 because it needs to have the embed binary to set the entrypoint correctly

@johnstcn
Copy link
Member

closing in favour of #246

@johnstcn johnstcn closed this Jun 24, 2024
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

Successfully merging this pull request may close these issues.

Sanitize the final container image for envbuilder
3 participants