Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

676
Views
No static files from the wwwroot folder after dockerize .net core mvc application on Rasperry Pi

I'm new in docker and I have a problem I can't deal with. I created .net core MVC application and this app is supposed to work on raspberry pi, so I dockerized my app on raspberry on HypriotOS and everything is good, but some images from wwwroot (default static files folder) is not Found (404). In wwwroot folder I have some css, js and images files and css, js and few images are available, but few .png files no. I don't have idea why.

  • .net core version is 2.2
  • I tired add line VOLUME ["/wwwroot"] in my Dockerfile
  • in Startup.Configure() method I have line app.UseStaticFiles();

My Dockerfile

FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /app

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

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

FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS runtime
WORKDIR /app
COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "TestApp.dll"]

Commands to build and run Docker image:

docker build -t testapp .
docker run  -p 8080:80 --name testapp testapp

Dockerize passes correctly, no errors. The application is accessible from the outside, everything works, but some graphics are not displayed (404 Not Found).

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Check your .dockerignore file for anything that might match the missing files/path. That's what fixed this for me.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!