Docker Community Forums

Share and learn in the Docker community.

New to docker - forbidden error help

Hello

I am new to docker, I am getting the following error when I try to build my app. Please help

Sending build context to Docker daemon 5.484MB
Step 1/17 : FROM microsoft/dotnet:2.2-aspnetcore-runtime-nanoserver-1709 AS base
2.2-aspnetcore-runtime-nanoserver-1709: Pulling from microsoft/dotnet
407ada6e90de: Retrying in 1 second
9ef95ce817ec: Retrying in 1 second
b1c56b678c06: Download complete
4c460812ddfa: Download complete
9ed960db348d: Download complete
5ffb15f2e928: Download complete
f5febc958fa5: Download complete
Forbidden

This is my docker File contents
FROM microsoft/dotnet:2.2.0-aspnetcore-runtime-nanoserver-1709 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM microsoft/dotnet:2.2.0-sdk-nanoserver-1709 AS build
WORKDIR /src
COPY ["./webapi.csproj", “./webapi/”]
RUN dotnet restore “webapi/webapi.csproj”
COPY . .
WORKDIR “/src/webapi”
RUN dotnet build “webapi.csproj” -c Release -o /app

FROM build AS publish
RUN dotnet publish “webapi.csproj” -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT [“dotnet”, “webapi.dll”]