'Docker Compose copies one folder but not another
I am still learning Docker and this situation has me stumped. Docker will copy one folder to the image/container but the other folder it skips and I can't figure out why.
Docker desktop 4.X Ubuntu (Linux) container
.NET 5.0 Blazor application
So in the application build the following two folders are output:
In the container though only one folder is there
My first thought would be caching but I am using docker-compose build --no-cache and docker-compose up -d --force-recreate.
I don't think the Dockerfile is the problem, or else I would not see any folders.
Update
Added Dockerfile:
FROM mcr.microsoft.com/dotnet/aspnet:5.0-buster-slim AS base
WORKDIR /app
EXPOSE 465
FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS build
WORKDIR /src
COPY ["./Email.Shared/Email.Shared.csproj", "./Email.Shared/"]
COPY ["./Email.API/Email.API.csproj", "./"]
RUN dotnet restore "Email.API.csproj"
COPY . .
WORKDIR "/src/Email.API"
RUN dotnet build "Email.API.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Email.API.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Email.API.dll", "--urls", "http://+:5150"]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


