Showing posts with label Docker. Show all posts
Showing posts with label Docker. Show all posts

Saturday 26 December 2020

ERROR: failed to register layer rename Access is denied

During execution of docker-compose, there are chances to get below issue as

C:\ProgramData\Docker\image\windowsfilter\layerdb\tmp\write-set-547194937 

C:\ProgramData\Docker\image\windowsfilter\layerdb\sha256\315e8c08db9b1b7e769ea42ea3ac985e1f8613472735b9a706145d53348f8d26: 

Access is denied


To resolve this issue, we have to make sure all mentioned ports are unique in docker-compose.yml by running below command.


If there is no output entries came for specific port - then we are good, else will have to change port number.

Please run below command in PowerShell as admin

netstat -aon | findstr 8090


Hope this help.

Container is unhealthy docker

During execution of docker-compose, there may be chance of getting that container is unhealthy.

Let's say

ERROR: for traefik  Container "d96f2d2804ef" is unhealthy.


To know exact Issue behind this issue and about status, run below command in PowerShell by pasting above container id

docker inspect --format "{{json .State.Health }}" d96f2d2804ef

Will be output in json exact error details.

To know more about issue run another command as

docker exec -it d96 bash (first 3 character of above issued container)



Hope this will help

Cannot start service cm: container is marked for removal and cannot be started

During Sitecore instance setup with docker-compose command, sometimes you may face below issue

ERROR: Cannot start service cm: container is marked for removal and cannot be started

or 

ERROR: Cannot start service mssql encountered an error during hcsshim sitecore docker

or

ERROR: Cannot start service solr encountered an error during hcsshim::System::Start: failure in a Windows system call: The virtual machine or container exited unexpectedly.


To resolve above issues, please follow below steps

Try below commands as PowerShell script(admin mode)

docker-compose down

docker-compose up -d


If issue not resolved then please try below approach


copy container id, for which facing issue then run below commands in PowerShell as admin

net stop docker

now manually delete Folder with matched container id from C:\Programdata\docker\containers

net start docker



Hope this help.

Friday 25 December 2020

Sitecore 10 update 1 Installation using docker

Recently Sitecore has released latest version 10.0.1 with new updates and improvements.

In this article, going to setup an Sitecore instance using docker.

sitecore-10-update-1


Let's start with Pre-requisites


Pre-requisites

Docker must be installed, running and Switched to Windows Container mode

docker-desktop-windows




Download Container Deployment Package from below link and unzip (at Lets say D:\SitecoreDocker101)

https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform/100/Sitecore_Experience_Platform_100_Update1.aspx

sitecore-docker-container


download init.ps1 and paste at D:\SitecoreDocker101\ltsc2019\xp0

run cmd (admin) and trigger iisreset /stop
if any port from docker-compose.yml are is use (
can check by netstat -aon | findstr <portNo> from PowerShell)
then stop that service to avoid any interrupt during installation.


Installation Steps


Open PowerShell as admin and run below commands in sequence

  cd D:\SitecoreDocker101\ltsc2019\xp0

  .\init.ps1  (will ask for instance name, sql password, sitecore admin password and license path)

  docker-compose up -d


Demo

Open docker desktop dashboard view, will see Sitecore-xp0 up and running.

from PowerShell, run below commands

  docker ps (To get container ids for images)

  docker exec -it <container id> ipconfig  (replace with container id of cm server)

copy IP address, and run on chrome

sitecore-10-update-1

Common Issues:

http://succorpoints.blogspot.com/2020/12/error-failed-to-register-layer-rename.html

http://succorpoints.blogspot.com/2020/12/not-able-to-find-network-sitecore.html

http://succorpoints.blogspot.com/2020/12/cannot-start-service-cm-container-is.html

http://succorpoints.blogspot.com/2020/12/container-is-unhealthy-docker.html

Thursday 24 December 2020

not able to find network sitecore-xp0_default Sitecore docker

may be getting this issue while setting up Sitecore instance using docker. To fix this issue

please run below command on powershell as admin in sequence


docker-compose stop

docker-compose down

iisreset

docker-compose up -d


with this new network container id will be generated.

Hope this will help.

Monday 7 September 2020

Start with Docker

To be honest, few days back Docker was alien term to me until Sitecore 10 release.

I was so curious to explore at least to understand motive to use Docker, but used to give justification to myself that Leave it, it's part of Devops.

After getting some idea on Docker understood that why everyone talking about Docker, why so popular.



In this article will be covering:

What problem Docker actually solve?
Why Docker playing lead roll?
What I understood as a developer?


Problem which Docker solve

Scenario 1: As a sitecore developer, whenever used to setup machine for development or installing any software almost every time used to get issue, if lucky then take less time to resolve and then again get installation issue for other steps or for other software and this going on.


Scenario 2: Let's assume we have three python applications, which planning to host on single server, since all application's python version are different as well as dependencies. Then we can not install different python version on same server.

We can achieve this by Docker host, but with same hosted OS mean if 2 application need to be hosted on Linux and last one on window then in this case will be requiring 2 docker host - 1 for Linux and another for windows.



Docker to me - pack all minimal required dependencies as image and then use as ready to use container.

For any application, all minimal required dependencies can be packed as image file and manage as version control - ready to use for anyone anytime anywhere.

An open source, platform independent that help to create container (consist of memory, ram, s/w, application code) which can take time at once but from next time will be ready to deploy at any platform.


Steps to use docker:

Basically first use to create image by packing everything or can download images from Docker Hub.
And then with the help of image create container where required to run application.

(in one line - Create an exe of application and then run on any windows application)

Docker Flow

setup/install docker depends on your operating system (Let's say Windows)
once install open docker command prompt and run
docker version

will see docker version information in two part

Docker client - which will show version details of machine where docker installed (host machine).
Docker server - this will show all the version details of Linux kernel details.


Hope this help to get basic understanding that Why Docker?