Remove Dockerfiles for consistency with other templates. Also fixes #694

This commit is contained in:
Steve Sanderson
2017-02-21 16:18:25 +00:00
parent 3c2fd50e8f
commit c9526dd4d2
8 changed files with 2 additions and 105 deletions

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
RUN apt-get update
RUN wget -qO- https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y build-essential nodejs
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
RUN apt-get update
RUN wget -qO- https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y build-essential nodejs
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
RUN apt-get update
RUN wget -qO- https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y build-essential nodejs
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
RUN apt-get update
RUN wget -qO- https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y build-essential nodejs
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
RUN apt-get update
RUN wget -qO- https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y build-essential nodejs
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -1,12 +0,0 @@
FROM microsoft/dotnet:1.1.0-sdk-projectjson
COPY . /app
WORKDIR /app
RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]
EXPOSE 5000/tcp
CMD ["dotnet", "run", "--server.urls", "http://*:5000"]

View File

@@ -95,9 +95,6 @@ function buildYeomanNpmPackage(outputRoot: string) {
{ from: /.*\.csproj$/, to: 'tokenreplace-namePascalCase.csproj' }
];
const contentReplacements = [
// Dockerfile items
{ from: /FROM microsoft\/dotnet:1.1.0-sdk-projectjson/g, to: 'FROM <%= dockerBaseImage %>' },
// .xproj items
{ from: /\bWebApplicationBasic\b/g, to: '<%= namePascalCase %>' },
{ from: /<ProjectGuid>[0-9a-f\-]{36}<\/ProjectGuid>/g, to: '<ProjectGuid><%= projectGuid %></ProjectGuid>' },
@@ -162,11 +159,6 @@ function buildDotNetNewNuGetPackage() {
type: 'bind',
binding: 'dotnet-cli-version',
replaces: '1.0.0-preview2-1-003177'
},
dockerBaseImage: {
type: 'parameter',
replaces: 'microsoft/dotnet:1.1.0-sdk-projectjson',
defaultValue: 'microsoft/dotnet:1.1.0-sdk-msbuild'
}
},
tags: { language: 'C#', type: 'project' },

View File

@@ -58,13 +58,11 @@ const templates: TemplateConfig[] = [
const sdkChoices = [{
value: '1.0.0-preview2-1-003177', // Current released version
name: 'project.json' + chalk.gray(' (compatible with .NET Core tooling preview 2 and Visual Studio 2015)'),
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/],
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-projectjson'
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/]
}, {
value: '1.0.0-preview3-004056', // Version that ships with VS2017RC
name: '.csproj' + chalk.gray(' (compatible with .NET Core tooling preview 3 and Visual Studio 2017)'),
includeFiles: [/\.csproj$/],
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-msbuild'
includeFiles: [/\.csproj$/]
}];
class MyGenerator extends yeoman.Base {
@@ -123,7 +121,6 @@ class MyGenerator extends yeoman.Base {
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
const chosenSdk = sdkChoices.filter(sdk => sdk.value === this._answers.sdkVersion)[0];
this._answers.dockerBaseImage = chosenSdk.dockerBaseImage;
done();
});