-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBuild-Images.ps1
executable file
·44 lines (38 loc) · 1.11 KB
/
Build-Images.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
#!/usr/bin/pwsh
Param(
$ApacheVersion = "2.4",
$MellonVersion = "0.15.0",
#Alpine Only Args
$XmlSecVersion = "1.2.28",
$LassoVersion = "2.6.0",
$Image = "soarinferret/mod_auth_mellon",
[switch]$DebianOnly,
[switch]$AlpineOnly,
[switch]$Push
)
# Alpine / Latest
if(!$DebianOnly){
docker build --rm `
--build-arg APACHE_VERSION=$ApacheVersion `
--build-arg MELLON_VERSION=$MellonVersion `
--build-arg XMLSEC_VERSION=$XmlSecVersion `
--build-arg LASSO_VERSION=$LassoVersion `
-f "alpine/Dockerfile" `
-t $Image`:$MellonVersion-alpine `
-t $Image`:latest `
-t $Image`:alpine `
"alpine"
}
# Debian
if(!$AlpineOnly){
docker build --rm `
--build-arg APACHE_VERSION=$ApacheVersion `
--build-arg MELLON_VERSION=$MellonVersion `
-f "debian/Dockerfile" `
-t $Image`:$MellonVersion-debian `
-t $Image`:debian `
"debian"
}
if($Push){
docker push $Image
}