File tree Expand file tree Collapse file tree 8 files changed +24
-24
lines changed
content/dotnet-template-azure-iot-edge-module/FSharp Expand file tree Collapse file tree 8 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1-buster AS build-env
1
+ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
2
2
WORKDIR /app
3
3
4
4
COPY *.fsproj ./
@@ -7,7 +7,7 @@ RUN dotnet restore
7
7
COPY . ./
8
8
RUN dotnet publish -c Release -o out
9
9
10
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1-buster-slim
10
+ FROM mcr.microsoft.com/dotnet/runtime:6.0
11
11
WORKDIR /app
12
12
COPY --from=build-env /app/out ./
13
13
Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1-buster-slim AS base
1
+ FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
2
2
3
3
RUN apt-get update && \
4
4
apt-get install -y --no-install-recommends unzip procps && \
@@ -8,7 +8,7 @@ RUN useradd -ms /bin/bash moduleuser
8
8
USER moduleuser
9
9
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
10
10
11
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1-buster AS build-env
11
+ FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
12
12
WORKDIR /app
13
13
14
14
COPY *.fsproj ./
Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1-buster -arm32v7 AS build-env
1
+ FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim -arm32v7 AS build-env
2
2
WORKDIR /app
3
3
4
4
COPY *.fsproj ./
@@ -7,7 +7,7 @@ RUN dotnet restore
7
7
COPY . ./
8
8
RUN dotnet publish -c Release -o out
9
9
10
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1-buster -slim-arm32v7
10
+ FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye -slim-arm32v7
11
11
WORKDIR /app
12
12
COPY --from=build-env /app/out ./
13
13
Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1-buster -slim-arm32v7 AS base
1
+ FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye -slim-arm32v7 AS base
2
2
3
3
RUN apt-get update && \
4
4
apt-get install -y --no-install-recommends unzip procps && \
@@ -8,7 +8,7 @@ RUN useradd -ms /bin/bash moduleuser
8
8
USER moduleuser
9
9
RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg
10
10
11
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1-buster -arm32v7 AS build-env
11
+ FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim -arm32v7 AS build-env
12
12
WORKDIR /app
13
13
14
14
COPY *.fsproj ./
Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1-buster -arm64v8 AS build-env
1
+ FROM mcr.microsoft.com/dotnet/sdk:6.0-bullseye-slim -arm64v8 AS build-env
2
2
WORKDIR /app
3
3
4
4
COPY *.fsproj ./
@@ -7,7 +7,7 @@ RUN dotnet restore
7
7
COPY . ./
8
8
RUN dotnet publish -c Release -o out
9
9
10
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1-buster -slim-arm64v8
10
+ FROM mcr.microsoft.com/dotnet/runtime:6.0-bullseye -slim-arm64v8
11
11
WORKDIR /app
12
12
COPY --from=build-env /app/out ./
13
13
Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/core/ sdk:3.1 -nanoserver-1809 AS build-env
1
+ FROM mcr.microsoft.com/dotnet/sdk:6.0 -nanoserver-ltsc2022 AS build-env
2
2
WORKDIR /app
3
3
4
4
COPY *.fsproj ./
@@ -7,7 +7,7 @@ RUN dotnet restore
7
7
COPY . ./
8
8
RUN dotnet publish -c Release -o out
9
9
10
- FROM mcr.microsoft.com/dotnet/core/ runtime:3.1 -nanoserver-1809
10
+ FROM mcr.microsoft.com/dotnet/runtime:6.0 -nanoserver-ltsc2022
11
11
WORKDIR /app
12
12
COPY --from=build-env /app/out ./
13
13
ENTRYPOINT ["dotnet", "SampleModule.dll"]
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ module SampleModule =
20
20
let PipeMessage ( message : Message ) ( userContext : obj ) =
21
21
let counterValue = Interlocked.Increment( counter)
22
22
23
- let deviceClient = userContext :?> DeviceClient
24
- if ( isNull( deviceClient )) then
23
+ let moduleClient = userContext :?> ModuleClient
24
+ if ( isNull( moduleClient )) then
25
25
raise ( InvalidOperationException( " UserContext doesn't contain " + " expected values" ))
26
26
27
27
let messageBytes = message.GetBytes()
@@ -34,7 +34,7 @@ module SampleModule =
34
34
message.Properties
35
35
|> Seq.iter ( fun prop -> pipeMessage.Properties.Add( prop.Key, prop.Value))
36
36
37
- deviceClient .SendEventAsync( " output1" , pipeMessage)
37
+ moduleClient .SendEventAsync( " output1" , pipeMessage)
38
38
|> Async.AwaitTask
39
39
|> Async.Start
40
40
@@ -55,7 +55,7 @@ module SampleModule =
55
55
56
56
// Open a connection to the Edge runtime
57
57
let ioTHubModuleClient =
58
- DeviceClient .CreateFromConnectionString( connectionString, settings)
58
+ ModuleClient .CreateFromConnectionString( connectionString, settings)
59
59
60
60
ioTHubModuleClient.OpenAsync()
61
61
|> Async.AwaitTask
Original file line number Diff line number Diff line change 1
1
<Project Sdk =" Microsoft.NET.Sdk" >
2
2
<PropertyGroup >
3
3
<OutputType >Exe</OutputType >
4
- <TargetFramework >netcoreapp3.1 </TargetFramework >
4
+ <TargetFramework >net6.0 </TargetFramework >
5
5
</PropertyGroup >
6
6
<ItemGroup >
7
7
<Compile Include =" Program.fs" />
8
8
</ItemGroup >
9
9
<ItemGroup >
10
- <PackageReference Include =" Microsoft.Azure.Devices.Client" Version =" 1.6.0-preview-001 " />
11
- <PackageReference Include =" Microsoft.Extensions.Configuration" Version =" 2.0.0-preview2-final " />
12
- <PackageReference Include =" Microsoft.Extensions.Configuration.Abstractions" Version =" 2.0.0-preview2-final " />
13
- <PackageReference Include =" Microsoft.Extensions.Configuration.Binder" Version =" 2.0.0-preview2-final " />
14
- <PackageReference Include =" Microsoft.Extensions.Configuration.EnvironmentVariables" Version =" 2.0.0-preview2-final " />
15
- <PackageReference Include =" Microsoft.Extensions.Configuration.FileExtensions" Version =" 2.0.0-preview2-final " />
16
- <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 2.0.0-preview2-final " />
10
+ <PackageReference Include =" Microsoft.Azure.Devices.Client" Version =" 1.* " />
11
+ <PackageReference Include =" Microsoft.Extensions.Configuration" Version =" 6.* " />
12
+ <PackageReference Include =" Microsoft.Extensions.Configuration.Abstractions" Version =" 6.* " />
13
+ <PackageReference Include =" Microsoft.Extensions.Configuration.Binder" Version =" 6.* " />
14
+ <PackageReference Include =" Microsoft.Extensions.Configuration.EnvironmentVariables" Version =" 6.* " />
15
+ <PackageReference Include =" Microsoft.Extensions.Configuration.FileExtensions" Version =" 6.* " />
16
+ <PackageReference Include =" Microsoft.Extensions.Configuration.Json" Version =" 6.* " />
17
17
<PackageReference Include =" System.Runtime.Loader" Version =" 4.3.0" />
18
18
</ItemGroup >
19
19
</Project >
You can’t perform that action at this time.
0 commit comments