I am trying to build a docker image based on this repo:
https://github.com/TechPreacher/iotedge-lorawan-starterkit-decoders
But the repo seems to have error in the docker files:
When I build the image using right click on Module.json Build IoT Edge Module Image I get this output:
[+] Building 2.5s (9/11)
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile.arm32v7 0.0s
=> => transferring dockerfile: 40B 0.0s
=> [internal] load metadata for docker.io/microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7 2.0s
=> [internal] load metadata for docker.io/microsoft/dotnet:2.1-sdk 1.2s
=> [build-env 1/4] FROM docker.io/microsoft/dotnet:2.1-sdk@sha256:ce3e3bd9286e81e9b289d8fceae9e5e51e51b9dc962076cc0c96452445aec13a 0.0s
=> [runtime 1/3] FROM docker.io/microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7@sha256:689e282b9b64cc86702309ae29f471b7ac588085f458a5ef3bc358071a527f2d 0.0s
=> CACHED [build-env 2/4] WORKDIR /DecoderCollection/ 0.0s
=> CACHED [runtime 2/3] WORKDIR /app 0.0s
=> ERROR [build-env 3/4] RUN dotnet restore 0.5s
------
> [build-env 3/4] RUN dotnet restore:
#9 0.429 MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
------
failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c dotnet restore]: runc did not terminate sucessfully
One screenshot of my folder structure:
I tried running the docker build command inside the DecoderCollection folder which has the .csproj but its the same error.
docker file@
FROM microsoft/dotnet:2.1-sdk AS build-env
#WORKDIR /DecoderCollection/
#COPY ./Samples/DecoderSample ./
RUN dotnet restore
RUN dotnet publish -c Release -o out
FROM microsoft/dotnet:2.1-aspnetcore-runtime-stretch-slim-arm32v7 AS runtime
WORKDIR /app
COPY --from=build-env /build/Samples/DecoderSample/out/* ./
ENTRYPOINT ["dotnet", "SensorDecoderModule.dll"]
