Skip to content
This repository was archived by the owner on Feb 13, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions templates/Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<% if(!coreclr){ %>FROM microsoft/aspnet:1.0.0-rc1-update1<% } %><% if(coreclr){ %>FROM microsoft/aspnet:1.0.0-rc1-update1-coreclr<% } %>

RUN printf "deb http://ftp.us.debian.org/debian jessie main\n" >> /etc/apt/sources.list
RUN apt-get -qq update && apt-get install -qqy sqlite3 libsqlite3-dev && rm -rf /var/lib/apt/lists/*

FROM microsoft/dotnet:latest

COPY . /app
WORKDIR /app
RUN ["dnu", "restore"]

RUN ["dotnet", "restore"]
RUN ["dotnet", "build"]

EXPOSE 5000/tcp
ENTRYPOINT ["dnx", "-p", "project.json", "Microsoft.AspNet.Server.Kestrel", "--server.urls", "http://0.0.0.0:5000"]
ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"]
7 changes: 7 additions & 0 deletions templates/projects/emptyweb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace <%= namespace %>
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
Expand Down
6 changes: 5 additions & 1 deletion templates/projects/emptyweb/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"type": "platform"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final"
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final"
},

"tools": {
Expand Down
7 changes: 7 additions & 0 deletions templates/projects/web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace <%= namespace %>
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
Expand Down
1 change: 1 addition & 0 deletions templates/projects/web/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
Expand Down
7 changes: 7 additions & 0 deletions templates/projects/webapi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Configuration;

namespace <%= namespace %>
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
Expand Down
1 change: 1 addition & 0 deletions templates/projects/webapi/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final"
Expand Down
7 changes: 7 additions & 0 deletions templates/projects/webbasic/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;

namespace <%= namespace %>
{
public class Program
{
public static void Main(string[] args)
{
var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: "ASPNETCORE_")
.Build();

var host = new WebHostBuilder()
.UseConfiguration(config)
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
Expand Down
1 change: 1 addition & 0 deletions templates/projects/webbasic/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
Expand Down
12 changes: 2 additions & 10 deletions test/subgenerators.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,11 @@ describe('Subgenerators without arguments tests', function() {
util.fileCheck('should create tsconfig.json file', 'tsconfig.json');
});

describe('aspnet:Dockerfile Mono-based', function() {
describe('aspnet:Dockerfile dotnet', function() {
var filename = 'Dockerfile';
util.goCreate(filename);
util.fileCheck('should create Dockerfile', filename);
util.fileContentCheck(filename, 'Check the content for Mono-based image tag', /FROM microsoft\/aspnet:1\.0\.0-rc1-update1/);
});

describe('aspnet:Dockerfile CoreCLR-based', function() {
var arg = '--coreclr';
var filename = 'Dockerfile';
util.goCreateWithArgs(filename, [arg]);
util.fileCheck('should create Dockerfile', filename);
util.fileContentCheck(filename, 'Check the content for CoreCLR-based image tag', /FROM microsoft\/aspnet:1\.0\.0-rc1-update1-coreclr/);
util.fileContentCheck(filename, 'Check the content for dotnet latest image tag', /FROM microsoft\/dotnet:latest/);
});

describe('aspnet:nuget', function() {
Expand Down