I use the default Blazor template from ApolloX and build it in release configuration and deploy it to my Apalis iMX6Q 1GB V1.1D. I used following commands in terminal of distro (Ubuntu 22.4) in VSCode:
It looks like, that the content of wwwroot folder is not available, but when I login to shell of docker container I can see that folder and its content:
I made it on my own. I changed the Dockerfile to the way like Microsoft do, when creating a blazor server project with visual studio 2022 and activating docker support. I just customize the first lines of the Dockerfile template to change the base aspdotnet image to your image ātorizon/aspdotnetā.
This is what I“ve done:
FROM --platform=linux/arm/v7 torizon/aspdotnet:3-6.0 AS base
RUN apt-get -y update && apt-get install -y --no-install-recommends && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*
WORKDIR /app
EXPOSE 8080
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY [ātesttorizonblazor/testtorizonblazor.csprojā, ātesttorizonblazor/ā]
RUN dotnet restore ātesttorizonblazor/testtorizonblazor.csprojā
COPY . .
WORKDIR ā/src/testtorizonblazorā
RUN dotnet build ātesttorizonblazor.csprojā -c Release -o /app/build
FROM build AS publish
RUN dotnet publish ātesttorizonblazor.csprojā -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT [ādotnetā, ātesttorizonblazor.dllā]
After that I just need to execute ādocker compose up -dā and everything is working fine in web browser.
Have a nice evening!