Skip to content

Commit cd7ed04

Browse files
sblomAndrew Gibson
authored andcommitted
Add Dockerfile to enable local linux testing on Windows
1 parent f2fe26a commit cd7ed04

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# If you want to build and test under Linux using a docker container, here's how:
2+
#
3+
#> docker build -t json-ld.net .
4+
#> docker run --rm json-ld.net dotnet test -v normal
5+
6+
# .NET Core 2.1 on Ubuntu 18.04 LTS
7+
FROM mcr.microsoft.com/dotnet/core/sdk:2.1-bionic
8+
9+
WORKDIR /App
10+
11+
# First we ONLY copy sln and csproj files so that we don't have to re-cache
12+
# dotnet restore every time a .cs file changes
13+
COPY src/json-ld.net/json-ld.net.csproj src/json-ld.net/json-ld.net.csproj
14+
COPY test/json-ld.net.tests/json-ld.net.tests.csproj test/json-ld.net.tests/json-ld.net.tests.csproj
15+
COPY JsonLD.sln JsonLD.sln
16+
RUN dotnet restore
17+
18+
# Then we copy everything and run dotnet build
19+
COPY . .
20+
RUN dotnet build

0 commit comments

Comments
 (0)