Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

define docker baseimage and tag #447

Merged
merged 15 commits into from May 11, 2020
Merged

define docker baseimage and tag #447

merged 15 commits into from May 11, 2020

Conversation

spboyer
Copy link
Contributor

@spboyer spboyer commented May 6, 2020

Fixes #240

@spboyer
Copy link
Contributor Author

spboyer commented May 6, 2020

@jkotalik @rynowak - See if this does the trick. Open to suggestions.

Copy link
Member

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

This seems like the right approach and has all of the necessary pieces 👍

I think the question here is not a valid objection to this change. We want this feature 😆

Can you add a test?

@spboyer spboyer marked this pull request as ready for review May 8, 2020 14:31
@spboyer spboyer requested a review from jkotalik as a code owner May 8, 2020 14:31
@@ -268,6 +268,10 @@ private static void EvaluateProject(OutputContext output, ProjectServiceBuilder
project.Frameworks.AddRange(sharedFrameworks.Select(s => new Framework(s)));
output.WriteDebugLine($"Found shared frameworks: {string.Join(", ", sharedFrameworks)}");

// determine container base image
project.ContainerInfo!.BaseImageName = projectInstance.GetPropertyValue("ContainerBaseImage");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think having a null check here for project.ContainerInfo is probably better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need the property here, should I create it?
new ContainerInfo() { UseMultiphaseDockerfile = false, };

@@ -268,6 +268,15 @@ private static void EvaluateProject(OutputContext output, ProjectServiceBuilder
project.Frameworks.AddRange(sharedFrameworks.Select(s => new Framework(s)));
output.WriteDebugLine($"Found shared frameworks: {string.Join(", ", sharedFrameworks)}");

// determine container base image
if (project.ContainerInfo == null)
Copy link
Member

Choose a reason for hiding this comment

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

Why is this here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See @jkotalik comment : #447 (comment)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidfowl I agree and it appears that it is the only entry point. However, @jkotalik is suggesting that there should be a null check, if it is (although it shoudn't be) we must create the instance.

previously I was just setting the values - project.ContainerInfo!.BaseImageName

@spboyer spboyer requested a review from jkotalik May 11, 2020 19:50
@spboyer spboyer changed the title defin docker baseimage and tag define docker baseimage and tag May 11, 2020
@jkotalik
Copy link
Contributor

I had a bunch of small nits, I just went ahead and committed them to the branch

@jkotalik jkotalik merged commit 70614e7 into dotnet:master May 11, 2020
kishanAnem pushed a commit to kishanAnem/tye that referenced this pull request May 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker Debian Based Images assumed with TFM Pattern
4 participants