Thursday, March 4, 2021

Sitecore 10 - ASP.NET Core Rendering with Docker and Sitecore 10 - Common issues and fixes.

Recently, I did two presentations on this topic, and during the local environment setup, I got a few errors. This blog post will mention those common issues and how I fixed them to make them work.


This error comes when we have the diff controller name (JSS rendering) the name should be the same and consistant,



Recreating the container resolve this issue - 

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

kill all running containers with docker kill $(docker ps -q)


Same as above, recreating the container.

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

kill all running containers with docker kill $(docker ps -q)


Same as above, recreating the container.

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

kill all running containers with docker kill $(docker ps -q)

Issue due to the naming inconsistency. After updating the JSS rendering name, the case got the fix.

Here is the link to my latest presentation - 

A few useful command - https://www.slideshare.net/JitendraSoni6/sitecore-10-aspnet-core-rendering-with-docker-and-sitecore-10

Docker
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker system prune
docker image prune
docker container prune
kill all running containers with docker kill $(docker ps -q)
delete all stopped containers with docker rm $(docker ps -a -q)
delete all images with docker rmi $(docker images -q)
update and stop a container that is in a crash-loop with docker update --restart=no && docker stop
Get docker container disk utilization: docker system df




Wednesday, March 3, 2021

Sitecore (Docker) - Fix for error response from daemon: conflict: unable to delete 77e0b9227773 (must be forced) - image is referenced in multiple repositories



Recently, I got the below error -

Error response from daemon: conflict: unable to delete 77e0b9227773 (must be forced) - image is referenced in multiple repositories

Error response from daemon: conflict: unable to delete 77e0b9227773 (must be forced) - image is referenced in multiple repositories

I checked that continer is already stopped and tried below command but that didn't resolve the issue

docker container prune

docker network prune

docker system prune

docker volume prune

docker builder prune

Finally, I tried the below command that help me to resolve the issue. I attempted to pass the -f parameter (I didn't find that details during the search)

docker image rm 77e0b9227773 --f

77e0b9227773  - this is the Id of the image.

I hope that will help to others.