I'm following this tutorial and this is my Dockerfile
FROM public.ecr.aws/lambda/dotnet:core3.1 AS base
FROM mcr.microsoft.com/dotnet/sdk:3.1 as build
WORKDIR /src
COPY ["s3Listener.csproj", "base/"]
RUN dotnet restore "base/s3Listener.csproj"
WORKDIR "/src"
COPY . .
RUN dotnet build "s3Listener.csproj" --configuration Release --output /app/build
FROM build AS publish
RUN dotnet publish "s3Listener.csproj" \
--configuration Release \
--runtime linux-x64 \
--self-contained false \
--output /app/publish \
-p:PublishReadyToRun=true
FROM base AS final
WORKDIR /var/task
COPY --from=publish /app/publish .
CMD ["s3Listener::s3Listener.Function::FunctionHandler"]
when I try to build an image using
docker build -t s3listener .
Step 11/14 : FROM base AS final pull access denied for base, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
What I'm doing wrong here?