Docker Community Forums

Share and learn in the Docker community.

Docker Load "Error response from daemon: pull access denied for <image>, repository does not exist or may require 'docker login'"

Hi everyone

I’ve saved my image with docker save command as below, following instructions from https://www.assistanz.com/import-and-export-docker-images/

$ docker save -o mypath\myimage.tar myimage

then I copied the .tar file to another desktop and loaded it with docker load

$ docker load -i mypath\myimage.tar

The load went fine, i can see the image with docker image ls. But when I try to run it, I got yhe following error:

$ docker run -it myimage
Unable to find image ‘myimage:latest’ locally
docker: Error response from daemon: pull access denied for myimage, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied.
See ‘docker run --help’.

Below follows my Dockerfile

FROM mcr_microsoft_com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr_microsoft_com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY [“myproject.csproj”, “”]
RUN dotnet restore “./myproject.csproj”
COPY . .
WORKDIR “/src/.”
RUN dotnet build “myproject.csproj” -c Release -o /app/build

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

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

Any help would be welcome. Thanks in advance.