Skip to content
This repository was archived by the owner on May 31, 2019. It is now read-only.

Conversation

@natemcmaster
Copy link
Contributor

@natemcmaster natemcmaster commented Feb 1, 2018

Fixes #279

Changes:

microsoft/aspnetcore-nightly

  • No longer install the ASP.NET Core package runtime store. This has been replaced by the ASP.NET Core shared runtime
  • Base image is now microsoft/dotnet-nightly:2.0-runtime-deps instead of 2.0-runtime. ASP.NET Core installers include the Microsoft.NETCore.App shared runtime

microsoft/aspnetcore-build-nightly

  • Remove bower and gulp
  • Install NodeJS 8.9.3 - Plans to upgrade Node to version 8? #334
    -Install Git 2.16.1 (NanoServer only) Removed git from the images.
  • Set WORKDIR /root/code. Helps with the common pitfall of trying to build the app in /, which fails b/c MSBuild tries to overwrite /bin.
  • Update base image to microsoft/dotnet-nightly:2.1.300-preview1-sdk
  • Don't run dotnet-restore when building the container. All packages should already exist in the NuGet fallback folder

Note: CI is expected to fail until microsoft/dotnet-nightly:2.1.300-preview1-sdk images are available.

cc @MichaelSimons @glennc

@natemcmaster natemcmaster requested a review from glennc February 1, 2018 22:09
@MichaelSimons
Copy link
Contributor

Required microsoft/dotnet-nightly changes are in dotnet/dotnet-docker-nightly#546

@@ -0,0 +1,17 @@
FROM microsoft/dotnet-nightly:2.1.300-preview1-jessie
Copy link
Contributor

Choose a reason for hiding this comment

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

Base SDK tag used across platforms isn't consistent. This particular usage isn't using the explicit SDK tag while others are.

Remove-Item -Force node.zip; `
Remove-Item -Force nodejs-tmp

## https://github.com/git-for-windows/git/releases
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to know more on the motivation for adding git. Have you been getting requests for this? I haven't heard of any which is why I ask. Should this be pushed to the base image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now that I think about it, we can probably remove this. I believe installing it was a requirement to make bower work. We're not installing bower anymore.


# set up environment
ENV ASPNETCORE_URLS http://+:80
ENV NODE_VERSION 8.9.4
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks to be defined multiple times.

ENV ASPNETCORE_URLS http://+:80

# Ensure packages required for standalone apps are pre-fetched
RUN mkdir /tmp/warmup && cd /tmp/warmup \
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the mixture of multi-command lines (e.g. && cd / && rm -rf /tmp/warmup) and single lines to be a little confusing.

ENV ASPNETCORE_URLS http://+:80

COPY --from=installer-env ["nodejs", "C:\\Program Files\\nodejs"]
USER ContainerAdministrator
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - inconsistent use of comments across Dockerfiles explaining the use of ContainerAdministrator

Remove-Item -Force nodejs-tmp

# Build image
FROM microsoft/dotnet-nightly:2.1.300-preview1-sdk-nanoserver-1709
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious why the difference in the order the components are installed between Linux and windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No specific reason. I'll update to be consistent.

"platforms": [
{
"dockerfile": "2.1/stretch/runtime",
"dockerfile": "2.1/stretch/amd64/runtime",
Copy link
Contributor

Choose a reason for hiding this comment

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

The readme should also get updated to correctly reference the new Dockerfile locations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

@natemcmaster
Copy link
Contributor Author

@MichaelSimons updated with cleanup according to your feedback.

Copy link
Contributor

@MichaelSimons MichaelSimons left a comment

Choose a reason for hiding this comment

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

LGTM

# docker run --rm -v /var/run/docker.sock:/var/run/docker.sock testrunner test/test.ps1 <test.ps1 args>

FROM ubuntu:16.04
FROM microsoft/powershell:ubuntu16.04
Copy link
Contributor

Choose a reason for hiding this comment

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

You may consider using a prebuilt image here - debian-stretch-docker-testrunner-63f2145-20184325094343. The source for it is at https://github.com/dotnet/dotnet-buildtools-prereqs-docker/blob/master/src/debian/stretch/docker-testrunner/Dockerfile. Would save some time not having to build this entire thing every time. This is being used in dotnet-docker-nightly - dotnet/dotnet-docker-nightly#538

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll give that a shot

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Works great! Thanks for pointing that out @MichaelSimons

@natemcmaster natemcmaster merged commit 2b0e6f3 into aspnet:dev Feb 8, 2018
@natemcmaster natemcmaster deleted the shared-runtime branch February 8, 2018 16:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants