Skip to content

Commit 3671936

Browse files
authored
Add arm32v7.debug dockerfile (#57)
1 parent d520acc commit 3671936

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

Test/Test.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public Test(DotNetFixture fixture)
4141
private static string BeforeEach(string lang, string repository, bool skipRestore = false)
4242
{
4343
var scaffoldName = Path.GetRandomFileName().Replace(".", "").ToString();
44-
var command = "new aziotedgemodule -n " + scaffoldName + " -lang " + lang + " -s " + skipRestore + " -r " + repository;
44+
var command = "new aziotedgemodule -n " + scaffoldName + " -lang " + lang + " -s " + skipRestore + " -r " + repository;
4545
Process.Start("dotnet", command).WaitForExit();
4646
return scaffoldName;
4747
}
@@ -55,7 +55,7 @@ public void TestArchitecture(string lang, bool skipRestore)
5555
{
5656
var repository = "test.azurecr.io/test";
5757
var scaffoldName = BeforeEach(lang, repository, skipRestore);
58-
var filesToCheck = new List<string> { ".gitignore", "module.json", "Dockerfile.amd64", "Dockerfile.windows-amd64", "Dockerfile.amd64.debug", "Dockerfile.arm32v7" };
58+
var filesToCheck = new List<string> { ".gitignore", "module.json", "Dockerfile.amd64", "Dockerfile.amd64.debug", "Dockerfile.arm32v7", "Dockerfile.arm32v7.debug", "Dockerfile.windows-amd64" };
5959

6060
if (skipRestore)
6161
{
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM microsoft/dotnet:2.1-runtime-stretch-slim-arm32v7 AS base
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends unzip procps && \
5+
rm -rf /var/lib/apt/lists/*
6+
7+
RUN useradd -ms /bin/bash moduleuser
8+
USER moduleuser
9+
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
10+
11+
FROM microsoft/dotnet:2.1-sdk AS build-env
12+
WORKDIR /app
13+
14+
COPY *.csproj ./
15+
RUN dotnet restore
16+
17+
COPY . ./
18+
RUN dotnet publish -c Debug -o out
19+
20+
FROM base
21+
WORKDIR /app
22+
COPY --from=build-env /app/out ./
23+
24+
ENTRYPOINT ["dotnet", "SampleModule.dll"]

content/dotnet-template-azure-iot-edge-module/CSharp/module.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"amd64": "./Dockerfile.amd64",
1010
"amd64.debug": "./Dockerfile.amd64.debug",
1111
"arm32v7": "./Dockerfile.arm32v7",
12+
"arm32v7.debug": "./Dockerfile.arm32v7.debug",
1213
"windows-amd64": "./Dockerfile.windows-amd64"
1314
}
1415
},
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM microsoft/dotnet:2.1-runtime-stretch-slim-arm32v7 AS base
2+
3+
RUN apt-get update && \
4+
apt-get install -y --no-install-recommends unzip procps && \
5+
rm -rf /var/lib/apt/lists/*
6+
7+
RUN useradd -ms /bin/bash moduleuser
8+
USER moduleuser
9+
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
10+
11+
FROM microsoft/dotnet:2.1-sdk AS build-env
12+
WORKDIR /app
13+
14+
COPY *.fsproj ./
15+
RUN dotnet restore
16+
17+
COPY . ./
18+
RUN dotnet publish -c Debug -o out
19+
20+
FROM base
21+
WORKDIR /app
22+
COPY --from=build-env /app/out ./
23+
24+
ENTRYPOINT ["dotnet", "SampleModule.dll"]

content/dotnet-template-azure-iot-edge-module/FSharp/module.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"amd64": "./Dockerfile.amd64",
1010
"amd64.debug": "./Dockerfile.amd64.debug",
1111
"arm32v7": "./Dockerfile.arm32v7",
12+
"arm32v7.debug": "./Dockerfile.arm32v7.debug",
1213
"windows-amd64": "./Dockerfile.windows-amd64"
1314
}
1415
},
15-
"buildOptions": []
16+
"buildOptions": [],
17+
"contextPath": "./"
1618
},
1719
"language": "fsharp"
18-
}
20+
}

0 commit comments

Comments
 (0)