Added docker support
This commit is contained in:
19
src/Web/Dockerfile
Normal file
19
src/Web/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
FROM microsoft/aspnetcore-build:2.1.300-preview1 AS build
|
||||
RUN npm install -g bower@1.8.4
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR /src/src/Web
|
||||
RUN dotnet restore -nowarn:msb3202,nu1503
|
||||
RUN dotnet build --no-restore -c Release -o /app
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish --no-restore -c Release -o /app
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app .
|
||||
ENTRYPOINT ["dotnet", "Web.dll"]
|
||||
@@ -119,7 +119,6 @@ namespace Microsoft.eShopWeb
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseBrowserLink();
|
||||
ListAllRegisteredServices(app);
|
||||
app.UseDatabaseErrorPage();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.0-rc1-final" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0-rc1-final" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.0-rc1-final" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="2.1.0-preview1-final" /> </ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Views\Catalog\" />
|
||||
<Folder Include="wwwroot\fonts\" />
|
||||
|
||||
Reference in New Issue
Block a user