File tree 4 files changed +17
-4
lines changed
4 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,10 @@ One convenient way to do this is to pass the same arguments to
82
82
83
83
For example, to build and test everything: ` .\build-mono-docker.ps1 -t test `
84
84
85
- This will run a temporary container using a custom
86
- [ rprouse/nunit-docker] ( https://hub.docker.com/r/rprouse/nunit-docker/ ) image
85
+ This will build a docker image and run a temporary container
87
86
based on the [ Mono image] ( https://hub.docker.com/r/library/mono/ ) and adding in
88
87
.NET Core. The script mounts the repo inside the container and executes the
89
88
[ build.sh] ( build.sh ) Cake bootstrapper with the arguments you specify.
89
+
90
+ The first build will be slow as it builds the new image, but subsequent runs will
91
+ be much quicker.
Original file line number Diff line number Diff line change
1
+ FROM mono:6.6.0
2
+
3
+ # Install .NET Core
4
+ RUN apt-get update && \
5
+ apt-get -y install wget && \
6
+ wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
7
+ dpkg -i packages-microsoft-prod.deb && \
8
+ apt-get -y install apt-transport-https && \
9
+ apt-get update && \
10
+ apt-get -y install dotnet-sdk-2.2
Original file line number Diff line number Diff line change 1
- trap [ Management.Automation.CommandNotFoundException ] {
1
+ if ( $null -eq ( Get-Command " docker.exe " - ErrorAction SilentlyContinue)) {
2
2
Write-Error ' Docker cannot be found. Make sure it is installed and added to the path.'
3
3
Start-Process - FilePath ' https://docs.docker.com/docker-for-windows/install/'
4
4
continue ;
5
5
}
6
6
7
- docker run -- rm - it - v ${PSScriptRoot} :/ nunit- console - w=/ nunit- console rprouse/ nunit- docker:latest bash build.sh $args
7
+ docker build - t nunit- console- build .
8
+ docker run -- rm - it - v ${PSScriptRoot} :/ nunit- console - w=/ nunit- console nunit- console- build bash build.sh $args
You can’t perform that action at this time.
0 commit comments