{"id":1006,"date":"2020-01-17T04:34:14","date_gmt":"2020-01-16T23:04:14","guid":{"rendered":"http:\/\/www.harshbaid.in\/?p=1006"},"modified":"2020-01-17T22:11:49","modified_gmt":"2020-01-17T16:41:49","slug":"docker-fixing-sitecore-docker-compose-error","status":"publish","type":"post","link":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/","title":{"rendered":"Docker: Fixing Sitecore docker-compose error"},"content":{"rendered":"\n

First thanks to Sitecore Slack Chat<\/a> #docker<\/strong> channel in helping to find solution to issues that I faced in my very first days of learning and playing with Docker and Sitecore with Docker.<\/p>\n\n\n\n

Here I’m trying to document the solution that might help others who face the same issue as me.<\/p>\n\n\n\n

To begin with, first I started to learn about Docker and then about Sitecore with Docker. I had watched some videos<\/a> on YouTube and Pluralsight course on Docker<\/a> and read GitHub Gists<\/a> from fellow Sitecore community Devs before starting with anything and then started with installing and playing with Docker shortly and followed this course as per my understanding of everything so far.<\/p>\n\n\n\n

Getting Started with Docker with Sitecore<\/h2>\n\n\n\n

Steps:<\/p>\n\n\n\n

  1. Install Docker for Windows<\/a><\/li>
  2. Clone Docker for Sitecore<\/a> repository<\/li>
  3. Executed below commands, trying to get the vanilla Sitecore up and running in docker.<\/li><\/ol>\n\n\n\n
    > Open powershell window in administrator mode\n\n> CD into directory where you cloned the repository in my case it was 'C:\\Projects\\docker-images\\'\n\n> .\\Build.ps1 -SitecoreUsername SITECORE_DEV_EMAIL -SitecorePassword SITECORE_DEV_PASSWORD -SitecoreVersion 9.3.0 -Topology xp -WindowsVersion 1803 -IncludeSpe\n\n# I had edited Build.ps1 to allow '1803' windows version here because it matched with my windows OS version at that point\n\n> .\\Set-LicenseEnvironmentVariable.ps1 -Path C:\\license\\license.xml\n\n> docker image ls\n\n> cd .\\windows\\tests\\9.3.x\n\n> docker-compose -f .\\docker-compose.xp.yml up<\/pre>\n\n\n\n

    Got stuck on this Docker error<\/h3>\n\n\n\n

    At this point, I got stuck with error message as below: <\/p>\n\n\n\n

    Pulling sql (sitecore-xp-sqldev:9.3.0-windowsservercore-ltsc2019)\u2026\n 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.\n Continue with the new image? [yN]<strong>y<\/strong>\n Pulling sql (sitecore-xp-sqldev:9.3.0-windowsservercore-ltsc2019)\u2026\n ERROR: pull access denied for sitecore-xp-sqldev, repository does not exist or may require 'docker login': denied: requested access to the resource is denied<\/pre>\n\n\n\n

    First Fix: Windows Update<\/h2>\n\n\n\n

    As I checked in the #docker channel in the Sitecore Slack and learned that I had to update my Windows OS to at-least 1903<\/code> version so I spent next day or two waiting for system updates to complete. Please note: The time taken depends on your machine and internet speed.<\/p>\n\n\n\n

    If you are thinking how to check Windows OS version?<\/h3>\n\n\n\n

    Check this out. Press Windows Key + I<\/code> and then click on System<\/strong> tile then click on About<\/strong> from left navigation and it should show your system version as below – <\/p>\n\n\n\n

    \"Windows<\/figure>\n\n\n\n

    This is noteworthy – After system update I tried Build.ps1<\/code> with new version i.e. 1903<\/code> (earlier it was 1803<\/code>) as below, it started doing more than what was done in last time so that was good sign: <\/p>\n\n\n\n

    .\\Build.ps1 -SitecoreUsername SITECORE_DEV_EMAIL -SitecorePassword SITECORE_DEV_PASSWORD -SitecoreVersion 9.3.0 -Topology xp -WindowsVersion 1903 -IncludeSpe<\/pre>\n\n\n\n

    This time Build.ps1<\/code> took around 2-3 hours to complete and once it completed I tried docker-compose -f .\\docker-compose.xp.yml up<\/code> command again and still had the same error at this point.<\/p>\n\n\n\n

    Final Fix: Update environment file<\/h2>\n\n\n\n

    Another quick chat in slack and I found the final fix. Update .env<\/code> file under \/windows\/tests\/9.3.x\/<\/code> folder as below:<\/p>\n\n\n\n

    \"Updated<\/figure>\n\n\n\n

    I had to update WINDOWSSERVERCORE_VERSION<\/code> from ltsc2019<\/code> to 1909<\/code> and NANOSERVER_VERSION<\/code> from 1803<\/code> to 1909<\/code>. I think these values got messed up when I was first trying to get it to work.<\/p>\n\n\n\n

    Quick note: Here I’m trying to setup Sitecore XP0 (XP standalone) for version 9.3.0 that is why I’m using ‘9.3.x’ folder so this folder can be different for you based what version you are targeting. <\/p><\/blockquote>\n\n\n\n

    Finally, I re-ran the docker-compose -f .\\docker-compose.xp.yml up<\/code> command again and there it started composing without the error.<\/p>\n\n\n\n

    That is all to resolve the said error with docker-compose<\/code>.<\/p>\n\n\n\n

    Finally, I was able to see my vanilla Sitecore instance from browser at http:\/\/localhost:44001\/ locally. Please note that the port number here depends on the configuration as I kept the default values that came from https:\/\/github.com\/Sitecore\/docker-images<\/a> it is port 44001 here. <\/p>\n\n\n\n

    Also, It is advised to use docker-compose<\/code> with flag -d<\/code> which will cut down the verbose logging seen in console and from what I’m hearing it’s called Detached mode<\/strong>.<\/p>\n\n\n\n

    Start following #docker <\/strong>channel in Sitecore Slack<\/a> for more fun stuff.<\/p>\n\n\n\n

    Thanks to Michael West<\/a>, Aaron Bickle<\/a>, and Dylan Young<\/a> for all the help…<\/p>\n\n\n\n

    Happy Sitecoring!<\/p>\n","protected":false},"excerpt":{"rendered":"

    First thanks to Sitecore Slack Chat #docker channel in helping to find solution to issues that I faced in my very first days of learning and playing with Docker and Sitecore with Docker. Here I’m trying to document the solution that might help others who face the same issue as me. To begin with, first […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[206],"tags":[250,243,251],"yoast_head":"\nDocker: Fixing Sitecore docker-compose error - Harsh Baid<\/title>\n<meta name=\"description\" content=\"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Docker: Fixing Sitecore docker-compose error - Harsh Baid\" \/>\n<meta property=\"og:description\" content=\"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/\" \/>\n<meta property=\"og:site_name\" content=\"Harsh Baid\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/harshbaidblog\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/harshbaid.net\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-16T23:04:14+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-01-17T16:41:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465\" \/>\n<meta name=\"author\" content=\"Harsh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@baid_harsh\" \/>\n<meta name=\"twitter:site\" content=\"@baid_harsh\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Harsh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/\",\"url\":\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/\",\"name\":\"Docker: Fixing Sitecore docker-compose error - Harsh Baid\",\"isPartOf\":{\"@id\":\"https:\/\/www.harshbaid.in\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465\",\"datePublished\":\"2020-01-16T23:04:14+00:00\",\"dateModified\":\"2020-01-17T16:41:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.harshbaid.in\/#\/schema\/person\/aca775e041b3f59337de8a66e3b100ef\"},\"description\":\"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage\",\"url\":\"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465\",\"contentUrl\":\"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.harshbaid.in\/#website\",\"url\":\"https:\/\/www.harshbaid.in\/\",\"name\":\"Harsh Baid\",\"description\":\"Sitecore & Microsoft Certified Software Engineer\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.harshbaid.in\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.harshbaid.in\/#\/schema\/person\/aca775e041b3f59337de8a66e3b100ef\",\"name\":\"Harsh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.harshbaid.in\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5408300a5a7ff94b7438a6144a8eeae9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5408300a5a7ff94b7438a6144a8eeae9?s=96&d=mm&r=g\",\"caption\":\"Harsh\"},\"sameAs\":[\"http:\/\/www.harshbaid.in\",\"https:\/\/facebook.com\/harshbaid.net\",\"https:\/\/x.com\/baid_harsh\"],\"url\":\"https:\/\/www.harshbaid.in\/author\/harsh-baid\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Docker: Fixing Sitecore docker-compose error - Harsh Baid","description":"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/","og_locale":"en_US","og_type":"article","og_title":"Docker: Fixing Sitecore docker-compose error - Harsh Baid","og_description":"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.","og_url":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/","og_site_name":"Harsh Baid","article_publisher":"http:\/\/www.facebook.com\/harshbaidblog","article_author":"https:\/\/facebook.com\/harshbaid.net","article_published_time":"2020-01-16T23:04:14+00:00","article_modified_time":"2020-01-17T16:41:49+00:00","og_image":[{"url":"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465"}],"author":"Harsh","twitter_card":"summary_large_image","twitter_creator":"@baid_harsh","twitter_site":"@baid_harsh","twitter_misc":{"Written by":"Harsh","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/","url":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/","name":"Docker: Fixing Sitecore docker-compose error - Harsh Baid","isPartOf":{"@id":"https:\/\/www.harshbaid.in\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage"},"image":{"@id":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage"},"thumbnailUrl":"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465","datePublished":"2020-01-16T23:04:14+00:00","dateModified":"2020-01-17T16:41:49+00:00","author":{"@id":"https:\/\/www.harshbaid.in\/#\/schema\/person\/aca775e041b3f59337de8a66e3b100ef"},"description":"This is a story about how author resolved a issue he faced while setting up Docker for Sitecore with help from Sitecore Slack, which may be helpful to you.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.harshbaid.in\/2020\/01\/17\/docker-fixing-sitecore-docker-compose-error\/#primaryimage","url":"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465","contentUrl":"https:\/\/i1.wp.com\/www.harshbaid.in\/wp-content\/uploads\/2020\/01\/image.png?fit=600%2C465"},{"@type":"WebSite","@id":"https:\/\/www.harshbaid.in\/#website","url":"https:\/\/www.harshbaid.in\/","name":"Harsh Baid","description":"Sitecore & Microsoft Certified Software Engineer","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.harshbaid.in\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.harshbaid.in\/#\/schema\/person\/aca775e041b3f59337de8a66e3b100ef","name":"Harsh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.harshbaid.in\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5408300a5a7ff94b7438a6144a8eeae9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5408300a5a7ff94b7438a6144a8eeae9?s=96&d=mm&r=g","caption":"Harsh"},"sameAs":["http:\/\/www.harshbaid.in","https:\/\/facebook.com\/harshbaid.net","https:\/\/x.com\/baid_harsh"],"url":"https:\/\/www.harshbaid.in\/author\/harsh-baid\/"}]}},"_links":{"self":[{"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/posts\/1006"}],"collection":[{"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/comments?post=1006"}],"version-history":[{"count":14,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/posts\/1006\/revisions"}],"predecessor-version":[{"id":1025,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/posts\/1006\/revisions\/1025"}],"wp:attachment":[{"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/media?parent=1006"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/categories?post=1006"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.harshbaid.in\/wp-json\/wp\/v2\/tags?post=1006"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}