ERROR: pull access denied for mlepc4w2-ugl, repository does not exist

  1. I am logged in to Docker.

  2. I am in /machine-learning-engineering-for-production-public/course4/week2-ungraded-labs/C4_W2_Lab_3_Latency_Test_Composedirectory on my machine (hence I am in the same directory as the locustfile.py and docker-compose.yml files).

  3. I run docker-compose up.

But all I get is Error messages, as follows:


$ docker-compose up

Pulling batch-64 (mlepc4w2-ugl:with-batch)…

ERROR: The image for the service you’re trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y

Pulling batch-64 (mlepc4w2-ugl:with-batch)…

ERROR: pull access denied for mlepc4w2-ugl, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied


Please advise.

1 Like

Hi @shahin! Do you have the mlepc4w2-ugl:with-batch image in your filesystem from a previous lab? You can check so by using the docker images command. It looks like you do not have the image on your local images so Docker is trying to pull it from DockerHub and it doesn’t exist so that is what is causing the error. Let me know if this is the case :slight_smile:

1 Like

Hi a-zarta,

ahh sorry, I don’t know why I assumed it would also be up on Docker hub. I also don’t know why I deleted the old images from Lab1, maybe I was just practising cleaning up old images… ?

I’ve re-created the necessary image from lab1 and docker-compose up is now working fine in this lab3.

Thanks!

1 Like

Awesome! I’m glad everything is now working. Managing images can become tricky real quick :sweat_smile:

1 Like

Really, how ?
(My error was caused by me, not down to Docker images being tricky).

1 Like

Once you get a lot of them and with different versions it starts getting difficult to track which ones you actually have. At least happened to me haha

2 Likes

So, to avoid this it would be good practice to always remove all created images at the end of your development task… right, or not ?

1 Like

I think it depends. For sure remove the dangling images (the ones that say none) and usually also stopped containers but it greatly depends on what you are working on. Sometimes I keep only the latest version of an image if I know it is useful for refactoring stuff in the mid-term.

IMO I think that a good rule of the thumb is: for short term usage maybe keep all images and versions, mid term only latest versions and long term might be worth deleting since you can always rebuild the image if needed. Building can be time consuming but if the task is not frequent enough then it is usually okay.

2 Likes

I’m presently experiencing this issue. @a-zarta I can use some help here please. I just went back to build old images as you said. But I still keep getting acess denied.

1 Like

Issue sorted. Thank you. Everything went back to normal when i built the “with batch” inage in lab 3. And docker-compose up is now up and running.