зеркало из https://github.com/dotnet/tye.git
made usage of 'Dockerfile' consistent as well as 'multi/single-phase'
This commit is contained in:
Родитель
908183290e
Коммит
96207c9af0
|
@ -42,7 +42,7 @@ namespace Microsoft.Tye
|
|||
public string? ImageTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or a sets value which determines whether a multiphase dockerfile is used.
|
||||
/// Gets or a sets value which determines whether a multi-phase Dockerfile is used.
|
||||
/// </summary>
|
||||
public bool? UseMultiphaseDockerfile { get; set; }
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Microsoft.Tye
|
|||
var dockerFilePath = Path.Combine(application.GetProjectDirectory(project), Path.GetDirectoryName(project.RelativeFilePath)!, "Dockerfile");
|
||||
if (File.Exists(dockerFilePath))
|
||||
{
|
||||
output.WriteDebugLine($"Using existing dockerfile '{dockerFilePath}'.");
|
||||
output.WriteDebugLine($"Using existing Dockerfile '{dockerFilePath}'.");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ namespace Microsoft.Tye
|
|||
dockerFilePath = tempFile.FilePath;
|
||||
}
|
||||
|
||||
// We need to know if this is a single-phase or multi-phase dockerfile because the context directory will be
|
||||
// We need to know if this is a single-phase or multi-phase Dockerfile because the context directory will be
|
||||
// different depending on that choice.
|
||||
string contextDirectory;
|
||||
if (container.UseMultiphaseDockerfile ?? true)
|
||||
|
@ -64,7 +64,7 @@ namespace Microsoft.Tye
|
|||
var publishOutput = service.Outputs.OfType<ProjectPublishOutput>().FirstOrDefault();
|
||||
if (publishOutput is null)
|
||||
{
|
||||
throw new InvalidOperationException("We should have published the project for a single-phase dockerfile.");
|
||||
throw new InvalidOperationException("We should have published the project for a single-phase Dockerfile.");
|
||||
}
|
||||
|
||||
contextDirectory = publishOutput.Directory.FullName;
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Microsoft.Tye
|
|||
using var writer = new StreamWriter(stream, encoding: Encoding.UTF8, bufferSize: -1, leaveOpen: true);
|
||||
|
||||
var entryPoint = Path.GetFileNameWithoutExtension(project.RelativeFilePath);
|
||||
output.WriteDebugLine($"Writing dockerfile to '{filePath}'.");
|
||||
output.WriteDebugLine($"Writing Dockerfile to '{filePath}'.");
|
||||
if (container.UseMultiphaseDockerfile ?? true)
|
||||
{
|
||||
await WriteMultiphaseDockerfileAsync(writer, entryPoint, container);
|
||||
|
@ -57,7 +57,7 @@ namespace Microsoft.Tye
|
|||
{
|
||||
await WriteLocalPublishDockerfileAsync(writer, entryPoint, container);
|
||||
}
|
||||
output.WriteDebugLine("Done writing dockerfile.");
|
||||
output.WriteDebugLine("Done writing Dockerfile.");
|
||||
}
|
||||
|
||||
private static async Task WriteMultiphaseDockerfileAsync(StreamWriter writer, string applicationEntryPoint, ContainerInfo container)
|
||||
|
|
|
@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Microsoft.Tye
|
||||
{
|
||||
// Used to publish a project when using a single-file dockerfile
|
||||
// Used to publish a project when using a single-phase Dockerfile
|
||||
public class PublishProjectStep : ServiceExecutor.Step
|
||||
{
|
||||
public override string DisplayText => "Publishing Project...";
|
||||
|
|
Загрузка…
Ссылка в новой задаче