{"id":351,"date":"2020-01-06T09:00:00","date_gmt":"2020-01-06T09:00:00","guid":{"rendered":"http:\/\/yer.ac\/blog\/?p=351"},"modified":"2020-06-17T14:20:21","modified_gmt":"2020-06-17T14:20:21","slug":"using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3","status":"publish","type":"post","link":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/","title":{"rendered":"Using Docker Containers for easy local WordPress development\ud83d\udc33"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This will cover off setting up a Docker container for local WordPress development &amp; mounting the container folder for easier development.<\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color wp-block-paragraph\"><strong>NOTE: Updated to note possible performance issue in Docker using Windows Containers and mounted volumes. See the end of this post.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-style-circle-mask\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"648\" height=\"465\" data-attachment-id=\"355\" data-permalink=\"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/image-1-6\/\" data-orig-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&amp;ssl=1\" data-orig-size=\"648,465\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?resize=648%2C465\" alt=\"Containers, one with a wordpress logo\" class=\"wp-image-355\" srcset=\"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?w=648&amp;ssl=1 648w, https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?resize=300%2C215&amp;ssl=1 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-do-this\">Why do this?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Typically when doing any kind of WordPress work (Which is <em>exceptionally<\/em> rare for me), I would spin up a new WP instance on my host, or use something like a local LAMP\/XAMP server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whilst this works, leveraging things like Docker mean almost zero configuration and more time developing. Better still, these then become throwaway environments!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"requirements\">Requirements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The only requirement for this is the installation of Docker (<a href=\"https:\/\/www.docker.com\/\">https:\/\/www.docker.com<\/a>)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"creating-the-wordpress-instance\">Creating the WordPress instance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Firstly, create the folder where the configuration will live, for example <code>C:\\Docker\\Wordpress<\/code> In this folder we need to make a file named <code>docker-compose.yml<\/code>. This will be the YAML file detailing our wordpress installation &#8211; such as login information and MySQL setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this file, copy and paste the content below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '3.1'\nservices:\n  wordpress:\n    image: wordpress\n    restart: always\n    ports:\n      - 1234:80\n    environment:\n      WORDPRESS_DB_HOST: db\n      WORDPRESS_DB_USER: exampleuser\n      WORDPRESS_DB_PASSWORD: examplepass\n      WORDPRESS_DB_NAME: exampledb\n  db:\n    image: mysql:5.7\n    restart: always\n    environment:\n      MYSQL_DATABASE: exampledb\n      MYSQL_USER: exampleuser\n      MYSQL_PASSWORD: examplepass\n      MYSQL_RANDOM_ROOT_PASSWORD: '1'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This will tell Docker that we need to use the image name &#8220;WordPress&#8221; from the Docker Hub (<a href=\"https:\/\/hub.docker.com\/_\/wordpress\">https:\/\/hub.docker.com\/_\/wordpress<\/a>), forward port 80 of the container (Which will be the exposed website) to port number 1234 of the parent host. This means going to http:\/\/localhost:1234 would go to port 80 of the docker container.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally to use MySQL v5.7 as our database. You shouldn&#8217;t need to change this information, but if you do, make sure that the Database information in the <code>wordpress<\/code> section matches the information in the <code>db<\/code> section.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once this file is saved, we can run <code>docker-compose up -d<\/code> whilst in the same directory. This will take the YAML file, download any images that are not already on the local system and then set WordPress and MySQL up based on the YAML.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note:<\/strong>: If you get the error <code>no matching manifest for windows\/amd64 in the manifest list entries<\/code> when running this command, and you are on Windows 10, you will need to enable &#8220;Experimental Mode&#8221; in your Docker installation. To do this, right-click on Docker in the system tray and go to settings, checking the box named &#8220;Experimental mode&#8221;.<\/p><\/blockquote>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Note:<\/strong>: If you get an error like <code>ERROR: for wordpress_db_1 Cannot create container for service db:<\/code>, this is usually caused by there being a conflict in ports. Try changing the external port (in this example &#8220;1234&#8221; for something else)<\/p><\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">We can confirm if the docker container is running by running <code>docker ps<\/code> to list all running containers, or by going to http:\/\/localhost:1234 (The port will be whatever you set it to in the YAML)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">From here you can follow the standard WordPress installation steps.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"stopping-and-starting-instances\">Stopping and starting instances<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can stop and start instances by doing the following:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>docker-compose stop<\/code> and <code>docker-compose up -d<\/code>. Stop may take a little while.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that these commands (in this syntax) have to be ran at the same level as the YAML file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"working-with-the-instance\">Working with the instance<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you just wanted to play with WordPress this would be enough, but what if you wanted to copy files to the instance, or edit files?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-1-ssh-ftp\">Option 1: SSH\/ FTP<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Although not personally a fan of this method, we could SSH to the container with a tool like PuTTY, see this guide: <a href=\"https:\/\/phase2.github.io\/devtools\/common-tasks\/ssh-into-a-container\/\">https:\/\/phase2.github.io\/devtools\/common-tasks\/ssh-into-a-container\/<\/a> We could also configure the container to have an FTP server. This won&#8217;t be covered as I believe the next option to be better.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"option-2-mount-a-windows-folder\">Option 2: Mount a windows folder<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This option will mount a specific folder within the Docker container to a folder on your own system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Before continuing, we need to make sure that the container is currently stopped (<code>docker-compose stop<\/code>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will make a change to the YAML file so that we add a <code>volumes<\/code> option, as shown below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>version: '3.1'\n\nservices:\n\n  wordpress:\n    image: wordpress\n    restart: always\n    ports:\n      - 1234:80\n    environment:\n      WORDPRESS_DB_HOST: db\n      WORDPRESS_DB_USER: exampleuser\n      WORDPRESS_DB_PASSWORD: examplepass\n      WORDPRESS_DB_NAME: exampledb\n    volumes: \n    - \"C:\/Docker\/Wordpress\/Mounted:\/var\/www\/html\"\n\n  db:\n    image: mysql:5.7\n    restart: always\n    environment:\n      MYSQL_DATABASE: exampledb\n      MYSQL_USER: exampleuser\n      MYSQL_PASSWORD: examplepass\n      MYSQL_RANDOM_ROOT_PASSWORD: '1'\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">As we can see, the <code>volumes<\/code> setting contains a string which is made up of 2 parts, seperated by a colon <code>:<\/code>. These are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>C:\/Docker\/Wordpress\/Mounted   &#8211; This is the local path you want to mount the folder against.<\/li><li>\/var\/www\/html&#8221;            &#8211; This is the path within the container you want to mount.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Note that personally I like having the mount in the same directory as the configuration YAML for clarity, but it can live anywhere on your system.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Saving this file and re-running the docker-compose command will now map the specified volume.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"footnote\">Footnote<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I am a bit of a newbie when it comes to Docker, and I don&#8217;t use WordPress an awful lot so do take with a pinch of salt, and do let me know if this can be improved! <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">[UPDATE]: Performance Issues<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It seems there are some well documented performance issues using volume mounts &#8211; especially on Mac and Windows. These caused the container to almost grind to a halt, even though there was hardly any CPU\/RAM\/IO use. There are many posts, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li> <a href=\"https:\/\/github.com\/docker\/for-win\/issues\/188\">https:\/\/github.com\/docker\/for-win\/issues\/188<\/a>  (Yet another long-open Github issue for Docker)<\/li><li> <a href=\"https:\/\/spin.atomicobject.com\/2017\/06\/20\/docker-mac-overcoming-slow-volumes\/\">https:\/\/spin.atomicobject.com\/2017\/06\/20\/docker-mac-overcoming-slow-volumes\/<\/a>  (Some alternate suggestions)<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For me, after doing some digging I found that doing the following helped greatly:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Switch to using Linux Containers if you are on Windows<\/strong>. This is a bit of a pain as I require Windows Containers for something else I am doing, but it seems like the only workaround.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use the :cached flag on the mounted volume<\/strong>. This is specifically for an issue reported on Mac, but appears to have been successful on Windows using Linux containers too. ( <a href=\"https:\/\/docs.docker.com\/compose\/compose-file\/#caching-options-for-volume-mounts-docker-desktop-for-mac\">https:\/\/docs.docker.com\/compose\/compose-file\/#caching-options-for-volume-mounts-docker-desktop-for-mac<\/a> )<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is done by changing the mounted volume line to append the :cached flag.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>volumes: \n    - C:\/Docker\/Wordpress\/Mounted:\/var\/www\/html:cached<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Creating WordPress development environment using Docker containers.<\/p>\n","protected":false},"author":1,"featured_media":355,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6,7],"tags":[31,30],"class_list":["post-351","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","category-devops","tag-docker","tag-wordpress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.<\/title>\n<meta name=\"description\" content=\"Using a local Docker container for wordpress development\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development\ud83d\udc33\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"og:description\" content=\"Using a local Docker container for wordpress development\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development\ud83d\udc33\/\" \/>\n<meta property=\"og:site_name\" content=\"yer.ac | Adventures of a developer, and other things.\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-06T09:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-17T14:20:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"648\" \/>\n\t<meta property=\"og:image:height\" content=\"465\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"yer.ac\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"yer.ac\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/\"},\"author\":{\"name\":\"yer.ac\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"headline\":\"Using Docker Containers for easy local WordPress development\ud83d\udc33\",\"datePublished\":\"2020-01-06T09:00:00+00:00\",\"dateModified\":\"2020-06-17T14:20:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/\"},\"wordCount\":905,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/image-1.png?fit=648%2C465&ssl=1\",\"keywords\":[\"docker\",\"wordpress\"],\"articleSection\":[\"Development\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/\",\"name\":\"Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/image-1.png?fit=648%2C465&ssl=1\",\"datePublished\":\"2020-01-06T09:00:00+00:00\",\"dateModified\":\"2020-06-17T14:20:21+00:00\",\"description\":\"Using a local Docker container for wordpress development\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/image-1.png?fit=648%2C465&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/yer.ac\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/image-1.png?fit=648%2C465&ssl=1\",\"width\":648,\"height\":465},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/2020\\\/01\\\/06\\\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using Docker Containers for easy local WordPress development\ud83d\udc33\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/yer.ac\\\/blog\\\/\",\"name\":\"yer.ac | Adventures of a developer, and other things.\",\"description\":\"Blog to keep track of things I am upto\",\"publisher\":{\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yer.ac\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/yer.ac\\\/blog\\\/#\\\/schema\\\/person\\\/4638b9d868c7d3747bd3bb01fbc8153d\",\"name\":\"yer.ac\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\",\"caption\":\"yer.ac\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.","description":"Using a local Docker container for wordpress development","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:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development\ud83d\udc33\/","og_locale":"en_US","og_type":"article","og_title":"Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.","og_description":"Using a local Docker container for wordpress development","og_url":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development\ud83d\udc33\/","og_site_name":"yer.ac | Adventures of a developer, and other things.","article_published_time":"2020-01-06T09:00:00+00:00","article_modified_time":"2020-06-17T14:20:21+00:00","og_image":[{"width":648,"height":465,"url":"https:\/\/i1.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","type":"image\/png"}],"author":"yer.ac","twitter_card":"summary_large_image","twitter_misc":{"Written by":"yer.ac","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#article","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/"},"author":{"name":"yer.ac","@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"headline":"Using Docker Containers for easy local WordPress development\ud83d\udc33","datePublished":"2020-01-06T09:00:00+00:00","dateModified":"2020-06-17T14:20:21+00:00","mainEntityOfPage":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/"},"wordCount":905,"commentCount":0,"publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"image":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","keywords":["docker","wordpress"],"articleSection":["Development","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/","url":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/","name":"Using Docker Containers for easy local WordPress development\ud83d\udc33 - yer.ac | Adventures of a developer, and other things.","isPartOf":{"@id":"https:\/\/yer.ac\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#primaryimage"},"image":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","datePublished":"2020-01-06T09:00:00+00:00","dateModified":"2020-06-17T14:20:21+00:00","description":"Using a local Docker container for wordpress development","breadcrumb":{"@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#primaryimage","url":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","contentUrl":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","width":648,"height":465},{"@type":"BreadcrumbList","@id":"https:\/\/yer.ac\/blog\/2020\/01\/06\/using-docker-containers-for-easy-local-wordpress-development%f0%9f%90%b3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yer.ac\/blog\/"},{"@type":"ListItem","position":2,"name":"Using Docker Containers for easy local WordPress development\ud83d\udc33"}]},{"@type":"WebSite","@id":"https:\/\/yer.ac\/blog\/#website","url":"https:\/\/yer.ac\/blog\/","name":"yer.ac | Adventures of a developer, and other things.","description":"Blog to keep track of things I am upto","publisher":{"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yer.ac\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/yer.ac\/blog\/#\/schema\/person\/4638b9d868c7d3747bd3bb01fbc8153d","name":"yer.ac","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg","caption":"yer.ac"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/67ed010c9cc7986d40647e061c6dcdb06d818776591c7e954055adb629621113?s=96&d=retro&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/yer.ac\/blog\/wp-content\/uploads\/2020\/01\/image-1.png?fit=648%2C465&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paP5IW-5F","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/351","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/comments?post=351"}],"version-history":[{"count":7,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/351\/revisions"}],"predecessor-version":[{"id":427,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/posts\/351\/revisions\/427"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media\/355"}],"wp:attachment":[{"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/media?parent=351"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/categories?post=351"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yer.ac\/blog\/wp-json\/wp\/v2\/tags?post=351"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}