Browse Source

Fixed issue with .NET 1.1 from image:latest and .NET 1.0.1 that we're currently using

pull/49/merge
CESARDELATORRE 8 years ago
parent
commit
1182802816
4 changed files with 11 additions and 8 deletions
  1. +7
    -1
      build-images.ps1
  2. +1
    -1
      src/Services/Catalog/Catalog.API/Dockerfile
  3. +2
    -2
      src/Services/Catalog/Catalog.API/Startup.cs
  4. +1
    -4
      src/Services/Catalog/Catalog.API/docker-compose.yml

+ 7
- 1
build-images.ps1 View File

@ -7,17 +7,19 @@ $pubFolderToDelete = $scriptPath + "\pub"
remove-item -path $pubFolderToDelete -Force -Recurse -ErrorAction SilentlyContinue
#cmd /c "rd /s pub" /q
# *** WebMVC image ***
$webPathToJson = $scriptPath + "\src\Web\WebMVC\project.json"
Write-Host "webPathToJson is $webPathToJson" -ForegroundColor Yellow
$webPathToPub = $scriptPath + "\pub\webMVC"
Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow
Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue
dotnet restore $webPathToJson
dotnet build $webPathToJson
dotnet publish $webPathToJson -o $webPathToPub
# *** WebSPA image ***
$webSPAPathToJson = $scriptPath + "\src\Web\WebSPA\eShopOnContainers.WebSPA\project.json"
Write-Host "webSPAPathToJson is $webSPAPathToJson" -ForegroundColor Yellow
@ -41,6 +43,7 @@ dotnet restore $catalogPathToJson
dotnet build $catalogPathToJson
dotnet publish $catalogPathToJson -o $catalogPathToPub
#*** Ordering service image ***
$orderingPathToJson = $scriptPath + "\src\Services\Ordering\Ordering.API\project.json"
Write-Host "orderingPathToJson is $orderingPathToJson" -ForegroundColor Yellow
@ -52,6 +55,7 @@ dotnet restore $orderingPathToJson
dotnet build $orderingPathToJson
dotnet publish $orderingPathToJson -o $orderingPathToPub
#*** Basket service image ***
$basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json"
Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow
@ -63,6 +67,8 @@ dotnet restore $basketPathToJson
dotnet build $basketPathToJson
dotnet publish $basketPathToJson -o $basketPathToPub
#*** Build Docker Images
docker build -t eshop/web $webPathToPub
docker build -t eshop/catalog.api $catalogPathToPub
docker build -t eshop/ordering.api $orderingPathToPub


+ 1
- 1
src/Services/Catalog/Catalog.API/Dockerfile View File

@ -1,4 +1,4 @@
FROM microsoft/aspnetcore:latest
FROM microsoft/aspnetcore:1.0.1
WORKDIR /app
EXPOSE 80
ADD . /app

+ 2
- 2
src/Services/Catalog/Catalog.API/Startup.cs View File

@ -52,9 +52,9 @@
options.DescribeAllEnumsAsStrings();
options.SingleApiVersion(new Swashbuckle.Swagger.Model.Info()
{
Title = "Catalog HTTP API",
Title = "eShopOnContainers - Catalog HTTP API",
Version = "v1",
Description = "The Catalog Service HTTP API",
Description = "The Catalog Microservice HTTP API. This is a Data-Driven/CRUD microservice sample",
TermsOfService = "Terms Of Service"
});
});


+ 1
- 4
src/Services/Catalog/Catalog.API/docker-compose.yml View File

@ -2,10 +2,7 @@ version: '2'
services:
catalog.api:
image: eshop/catalog.api
build:
context: .
dockerfile: Dockerfile
image: eshop/catalog.api
environment:
- ConnectionString=Server=catalog.data;Initial Catalog=CatalogData;User Id=sa;Password=Pass@word
expose:


Loading…
Cancel
Save