mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Remove Dockerfiles for consistency with other templates. Also fixes #694
This commit is contained in:
@@ -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"]
|
|
||||||
@@ -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"]
|
|
||||||
@@ -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"]
|
|
||||||
@@ -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"]
|
|
||||||
@@ -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"]
|
|
||||||
@@ -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"]
|
|
||||||
@@ -95,9 +95,6 @@ function buildYeomanNpmPackage(outputRoot: string) {
|
|||||||
{ from: /.*\.csproj$/, to: 'tokenreplace-namePascalCase.csproj' }
|
{ from: /.*\.csproj$/, to: 'tokenreplace-namePascalCase.csproj' }
|
||||||
];
|
];
|
||||||
const contentReplacements = [
|
const contentReplacements = [
|
||||||
// Dockerfile items
|
|
||||||
{ from: /FROM microsoft\/dotnet:1.1.0-sdk-projectjson/g, to: 'FROM <%= dockerBaseImage %>' },
|
|
||||||
|
|
||||||
// .xproj items
|
// .xproj items
|
||||||
{ from: /\bWebApplicationBasic\b/g, to: '<%= namePascalCase %>' },
|
{ from: /\bWebApplicationBasic\b/g, to: '<%= namePascalCase %>' },
|
||||||
{ from: /<ProjectGuid>[0-9a-f\-]{36}<\/ProjectGuid>/g, to: '<ProjectGuid><%= projectGuid %></ProjectGuid>' },
|
{ from: /<ProjectGuid>[0-9a-f\-]{36}<\/ProjectGuid>/g, to: '<ProjectGuid><%= projectGuid %></ProjectGuid>' },
|
||||||
@@ -162,11 +159,6 @@ function buildDotNetNewNuGetPackage() {
|
|||||||
type: 'bind',
|
type: 'bind',
|
||||||
binding: 'dotnet-cli-version',
|
binding: 'dotnet-cli-version',
|
||||||
replaces: '1.0.0-preview2-1-003177'
|
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' },
|
tags: { language: 'C#', type: 'project' },
|
||||||
|
|||||||
@@ -58,13 +58,11 @@ const templates: TemplateConfig[] = [
|
|||||||
const sdkChoices = [{
|
const sdkChoices = [{
|
||||||
value: '1.0.0-preview2-1-003177', // Current released version
|
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)'),
|
name: 'project.json' + chalk.gray(' (compatible with .NET Core tooling preview 2 and Visual Studio 2015)'),
|
||||||
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/],
|
includeFiles: [/^project.json$/, /\.xproj$/, /_placeholder.txt$/, /\.deployment$/]
|
||||||
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-projectjson'
|
|
||||||
}, {
|
}, {
|
||||||
value: '1.0.0-preview3-004056', // Version that ships with VS2017RC
|
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)'),
|
name: '.csproj' + chalk.gray(' (compatible with .NET Core tooling preview 3 and Visual Studio 2017)'),
|
||||||
includeFiles: [/\.csproj$/],
|
includeFiles: [/\.csproj$/]
|
||||||
dockerBaseImage: 'microsoft/dotnet:1.1.0-sdk-msbuild'
|
|
||||||
}];
|
}];
|
||||||
|
|
||||||
class MyGenerator extends yeoman.Base {
|
class MyGenerator extends yeoman.Base {
|
||||||
@@ -123,7 +121,6 @@ class MyGenerator extends yeoman.Base {
|
|||||||
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
|
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
|
||||||
|
|
||||||
const chosenSdk = sdkChoices.filter(sdk => sdk.value === this._answers.sdkVersion)[0];
|
const chosenSdk = sdkChoices.filter(sdk => sdk.value === this._answers.sdkVersion)[0];
|
||||||
this._answers.dockerBaseImage = chosenSdk.dockerBaseImage;
|
|
||||||
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user