Skip to content

Commit

Permalink
Code updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sadukie committed Jul 1, 2022
1 parent 527e9bd commit 4749de6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ WORKDIR /source/dotnetcore-docs-hello-world
RUN dotnet publish -c release -o /app

# final stage/image
# We're using a tag that is explicitly a Linux container
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
COPY --from=build /app ./

# Expose port 80
# This is important in order for the Azure App Service to pick up the app
ENV PORT 80
EXPOSE 80


# Start the app
ENTRYPOINT ["dotnet", "dotnetcoresample.dll"]
1 change: 1 addition & 0 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ COPY --from=build /app ./

# Expose port 80
# This is important in order for the Azure App Service to pick up the app
ENV PORT 80
EXPOSE 80

# Start the app
Expand Down
5 changes: 2 additions & 3 deletions Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace dotnetcoresample.Pages;
public class IndexModel : PageModel
{

public string OSVersion { get; set; }
public string OSVersion { get { return RuntimeInformation.OSDescription; } }

private readonly ILogger<IndexModel> _logger;

Expand All @@ -17,7 +17,6 @@ public IndexModel(ILogger<IndexModel> logger)
}

public void OnGet()
{
this.OSVersion = RuntimeInformation.OSDescription;
{
}
}

0 comments on commit 4749de6

Please sign in to comment.