Skip to content

Commit b02c1b8

Browse files
committed
Migrate all dockerfiles to use 2.1 image. Added ApiBehaviorOptions into Catalog
1 parent d1b6bc8 commit b02c1b8

18 files changed

Lines changed: 211 additions & 158 deletions

File tree

src/ApiGateways/ApiGw-Base/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM microsoft/aspnetcore:2.0 AS base
1+
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
22
WORKDIR /app
33
EXPOSE 80
44

5-
FROM microsoft/aspnetcore-build:2.0 AS build
5+
FROM microsoft/dotnet:2.1-sdk AS build
66
WORKDIR /src
77
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
88
RUN dotnet restore src/ApiGateways/ApiGw-Base/

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM microsoft/aspnetcore:2.0.5 AS base
1+
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
22
WORKDIR /app
33
EXPOSE 80
44

5-
FROM microsoft/aspnetcore-build:2.0 AS build
5+
FROM microsoft/dotnet:2.1-sdk AS build
66
WORKDIR /src
77
COPY . .
88
RUN dotnet restore -nowarn:msb3202,nu1503

src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM microsoft/aspnetcore:2.0.5 AS base
1+
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
22
WORKDIR /app
33
EXPOSE 80
44

5-
FROM microsoft/aspnetcore-build:2.0 AS build
5+
FROM microsoft/dotnet:2.1-sdk AS build
66
WORKDIR /src
77
COPY . .
88
RUN dotnet restore -nowarn:msb3202,nu1503

src/Services/Basket/Basket.API/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM microsoft/aspnetcore:2.0.5 AS base
1+
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
22
WORKDIR /app
33
EXPOSE 80
44

5-
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
5+
FROM microsoft/dotnet:2.1-sdk AS build
66
WORKDIR /src
77
COPY . .
88
RUN dotnet restore -nowarn:msb3202,nu1503

src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
1616
{
1717
[Route("api/v1/[controller]")]
18+
[ApiController]
1819
public class CatalogController : ControllerBase
1920
{
2021
private readonly CatalogContext _catalogContext;
@@ -25,8 +26,8 @@ public CatalogController(CatalogContext context, IOptionsSnapshot<CatalogSetting
2526
{
2627
_catalogContext = context ?? throw new ArgumentNullException(nameof(context));
2728
_catalogIntegrationEventService = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));
28-
2929
_settings = settings.Value;
30+
3031
((DbContext)context).ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
3132
}
3233

src/Services/Catalog/Catalog.API/Controllers/PicController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
1010

1111
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
12-
{
12+
{
1313
public class PicController : Controller
1414
{
1515
private readonly IHostingEnvironment _env;

src/Services/Catalog/Catalog.API/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM microsoft/aspnetcore:2.0.5 AS base
1+
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
22
WORKDIR /app
33
EXPOSE 80
44

5-
FROM microsoft/aspnetcore-build:2.0.5-2.1.4 AS build
5+
FROM microsoft/dotnet:2.1-sdk AS build
66
WORKDIR /src
77
COPY . .
88
RUN dotnet restore -nowarn:msb3202,nu1503

0 commit comments

Comments
 (0)