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

This commit is contained in:
CESARDELATORRE 2016-11-30 15:01:14 -08:00
parent faaaf2a72d
commit 1182802816
4 changed files with 11 additions and 8 deletions

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

View File

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

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"
});
});

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: