forked from dotnet/sdk-container-builds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Directory.Solution.targets
40 lines (32 loc) · 1.9 KB
/
Directory.Solution.targets
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
<Project>
<PropertyGroup>
<_RegistryPort>5010</_RegistryPort>
</PropertyGroup>
<Target Name="StartDockerRegistry">
<Exec Command="docker run -d -p $(_RegistryPort):5000 --restart=always --name registry registry:2" />
</Target>
<Target Name="PreloadBaseImages" DependsOnTargets="StartDockerRegistry">
<PropertyGroup>
<_MCR>mcr.microsoft.com</_MCR>
<_LocalRegistry>localhost:5010</_LocalRegistry>
</PropertyGroup>
<Exec Command="docker pull $(_MCR)/dotnet/runtime:6.0" />
<Exec Command="docker tag $(_MCR)/dotnet/runtime:6.0 $(_LocalRegistry)/dotnet/runtime:6.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/runtime:6.0" />
<Exec Command="docker pull $(_MCR)/dotnet/runtime:7.0" />
<Exec Command="docker tag $(_MCR)/dotnet/runtime:7.0 $(_LocalRegistry)/dotnet/runtime:7.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/runtime:7.0" />
<Exec Command="docker pull $(_MCR)/dotnet/sdk:6.0" />
<Exec Command="docker tag $(_MCR)/dotnet/sdk:6.0 $(_LocalRegistry)/dotnet/sdk:6.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/sdk:6.0" />
<Exec Command="docker pull $(_MCR)/dotnet/sdk:7.0" />
<Exec Command="docker tag $(_MCR)/dotnet/sdk:7.0 $(_LocalRegistry)/dotnet/sdk:7.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/sdk:7.0" />
<Exec Command="docker pull $(_MCR)/dotnet/aspnet:6.0" />
<Exec Command="docker tag $(_MCR)/dotnet/aspnet:6.0 $(_LocalRegistry)/dotnet/aspnet:6.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/aspnet:6.0" />
<Exec Command="docker pull $(_MCR)/dotnet/aspnet:7.0" />
<Exec Command="docker tag $(_MCR)/dotnet/aspnet:7.0 $(_LocalRegistry)/dotnet/aspnet:7.0" />
<Exec Command="docker push $(_LocalRegistry)/dotnet/aspnet:7.0" />
</Target>
</Project>