forked from dockersamples/atsea-sample-shop-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ps1
44 lines (30 loc) · 1.09 KB
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$wd = $pwd
## SQL Server Database
# build the database builder
cd $wd\docker\database
docker build -t atsea-db-builder -f Dockerfile.builder .
# build the dacpac for the database schema
rmdir -Force -Recurse out
mkdir out
docker run --rm -v $pwd\out:c:\bin -v $wd\dotnet:c:\src atsea-db-builder c:\src\Docker.AtSea\Docker.AtSea.Database\build.ps1
# build the database image
docker build -t atsea-db .
# build the database builder
cd $wd\docker\database
docker build -t atsea-db-builder -f Dockerfile.builder .
# build the dacpac for the database schema
rmdir -Force -Recurse out
mkdir out
docker run --rm -v $pwd\out:c:\bin -v $wd\dotnet:c:\src atsea-db-builder c:\src\Docker.AtSea\Docker.AtSea.Database\build.ps1
# build the database image
docker build -t atsea-db .
## .NET WebApi
cd $wd\docker\api
docker build -t atsea-api-builder -f Dockerfile.builder .
# build the web output
rmdir -Force -Recurse out
mkdir out
docker run --rm -v $pwd\out:c:\bin -v $wd\dotnet:c:\src atsea-api-builder c:\src\Docker.AtSea\Docker.AtSea.Api\build.ps1
# build the web api image
docker build -t atsea-api .
cd $wd