This repository was archived by the owner on May 31, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 168
Add README to 2.1 folder explaining where the 2.1 images have gone #408
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
HTTP 301 Moved Permanently | ||
-------------------------- | ||
|
||
**Where are the 2.1 aspnet-docker images?** | ||
|
||
In 2.1\*, the ASP.NET Core Docker images have migrated to https://github.com/dotnet/dotnet-docker. | ||
|
||
_\*Note: ASP.NET Core 2.1 is still in preview._ | ||
|
||
**How can I upgrade from 1.x/2.0 to 2.1?** | ||
|
||
You can upgrade to 2.1 and by changing the repository name in the `FROM` line in your Dockerfile using this mapping: | ||
|
||
Current | Upgrade | ||
--------|-------------- | ||
`microsoft/aspnetcore:1.0`<br>`microsoft/aspnetcore:1.1`<br>`microsoft/aspnetcore:2.0` | `microsoft/dotnet:2.1-aspnetcore-runtime` | ||
`microsoft/aspnetcore-build:1.0`<br>`microsoft/aspnetcore-build:1.1`<br>`microsoft/aspnetcore-build:2.0` | `microsoft/dotnet:2.1-sdk` | ||
|
||
**I was using NodeJS in `microsoft/aspnetcore-build`, but this is missing from `microsoft/dotnet:2.1-sdk`. What should I do?** | ||
|
||
You can either install NodeJS by adding a few lines of code to your Dockerfile that download and extract NodeJS, | ||
or you can use the multi-stage feature of Docker and the official NodeJS images. | ||
|
||
Sample code to install NodeJS on your own: | ||
|
||
```Dockerfile | ||
# set up node | ||
ENV NODE_VERSION 8.9.4 | ||
ENV NODE_DOWNLOAD_SHA 21fb4690e349f82d708ae766def01d7fec1b085ce1f5ab30d9bda8ee126ca8fc | ||
RUN curl -SL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz" --output nodejs.tar.gz \ | ||
&& echo "$NODE_DOWNLOAD_SHA nodejs.tar.gz" | sha256sum -c - \ | ||
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \ | ||
&& rm nodejs.tar.gz \ | ||
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs | ||
``` | ||
|
||
Sample code to use multi-arch build | ||
```Dockerfile | ||
FROM node:8 AS node-builder | ||
WORKDIR /src | ||
COPY . . | ||
RUN npm run webpack | ||
|
||
FROM microsoft/dotnet:2.1-sdk AS dotnet-builder | ||
WORKDIR /app | ||
COPY --from=node-builder /src/dist/*.js ./dist | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What sample do you see as the most common? I was thinking multi-stage using the NodeJS image would be. I think the most common sample should be listed first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's sort of new territory since NodeJS has been bundled in the image until this point, so not sure which is more common. I would personally use multi-stage builds, but know lots of users have MSBuild targets invoking npm.