1

So I'm not sure what information is required here, but I'm going to try my best, I've built a small website that runs in dotnet-core, more specifically dotnet-core 2.0:<TargetFramework>netcoreapp2.0</TargetFramework>.

I have installed docker on my raspberry pi:

pi@swarm-1:~ $ docker --version
Docker version 18.01.0-ce, build 03596f5

I have also managed to install dot net core 2.0 on there as well through this guide

https://jeremylindsayni.wordpress.com/2017/07/23/running-a-net-core-2-app-on-raspbian-jessie-and-deploying-to-the-pi-with-cake/


pi@swarm-1:~ $ dotnet --info
Microsoft .NET Core Shared Framework Host
Version : 2.0.4
Build : 7f262f453d8c8479b9af91d34c013b3aa05bc1ff`

I have downloaded a docker image onto my pi:

pi@swarm-1:~ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
joro550/radiusnet latest d579944265b0 16 hours ago 349MB

When I run the docker run command I do get a id back from docker:

pi@swarm-1:~ $ docker run -d -p 8080:80 joro550/radiusnet
d5c579332abef8cf1938ef7a88aea43e3e84380099e44e2adee7fca196a49de9

but when I list my running containers with ps I get an emty list:

pi@swarm-1:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
pi@swarm-1:~ $

I have tried to run docker ps -a:

putty screenshot of docker ps -a

The contents of the dockerfile if this is useful for anyone:

FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app

# copy csproj and restore as distinct layers
COPY /src ./
RUN dotnet restore

# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=build-env /app/src/RadiusNet.Web/out .
ENTRYPOINT ["dotnet", "RadiusNet.Web.dll"]`

Intestingly when I run dotnet *.dll

I get the error message:

pi@swarm-1:~ $ dotnet helloworld.dll
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

Following the Debian guide for the dotnet-core install give me this: error message for dotnet-core

If there is anything I missed please let me know

1 Answer 1

1

After a bit of research and a lot of trial and error I believe it was an issue with my docker file, updated docker file below:

FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app

# copy csproj and restore as distinct layers
COPY /src ./
RUN dotnet restore

# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out -r linux-arm

# build runtime image
FROM microsoft/dotnet:2.0.0-runtime-stretch-arm32v7
WORKDIR /app
COPY --from=build-env /app/src/RadiusNet.Web/out .
ENTRYPOINT ["dotnet", "RadiusNet.Web.dll"]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.