I have asp core api project and i am using visual studio 2017 to run my project. After i renamed the docker container that was previously created using visual studio using this command on command line,
docker rename CONTAINER NEW_NAME
I receive the following message when i try to run the project again in visual studio.
Thanks for the help
Can not find docker container with the name starting with 'previous_container_name'.
If you use the default storage driver overlay2, then your Docker images are stored in /var/lib/docker/overlay2 . There, you can find different files that represent read-only layers of a Docker image and a layer on top of it that contains your changes.
This usually means that Docker is trying to run an image, but it doesn't exist on your computer, and Docker can't find it in a registry either. This tends to happen if you're trying to run some software which requires you to build the container image yourself first (with a Dockerfile).
With Dockerfile written, you can build the image using the following command: $ docker build . We can see the image we just built using the command docker images.
This error started happening to me when someone on the team unchecked the build checkbox for the docker-compose project. Make sure it is enabled in Build -> Configuration Manager
Delete the .vs
folder in your solution directory (close the solution first), the Docker image name seems to be cached somewhere in there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With