<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daily Tech Learning</title>
    <description>The latest articles on DEV Community by Daily Tech Learning (@dailytechlearning).</description>
    <link>https://dev.to/dailytechlearning</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F672078%2F8710b851-22bd-48e3-af48-e423b54a268c.png</url>
      <title>DEV Community: Daily Tech Learning</title>
      <link>https://dev.to/dailytechlearning</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dailytechlearning"/>
    <language>en</language>
    <item>
      <title>Docker Pull Command</title>
      <dc:creator>Daily Tech Learning</dc:creator>
      <pubDate>Sat, 07 Aug 2021 10:18:37 +0000</pubDate>
      <link>https://dev.to/dailytechlearning/docker-pull-command-10po</link>
      <guid>https://dev.to/dailytechlearning/docker-pull-command-10po</guid>
      <description>&lt;p&gt;To use an image, either you can have it located in the docker host, or you need to fetch the image from a &lt;a href="https://dailytechlearning.com/cloud-computing/docker/docker-registry"&gt;docker registry . &lt;/a&gt;&lt;a href="https://hub.docker.com/" rel="noreferrer noopener"&gt;Dockerhub&lt;/a&gt; is the Docker’s offical registry , from where you can fetch multiple community images. There are tons of official and vendor-specific pre-built images in Dockerhub such as Ubuntu, Python, CentOs, Nginx, Apache, Java, NodeJs, etc.&lt;/p&gt;

&lt;p&gt;You can browse the docker hub repository for the required image.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RXUZtW_n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_33_05-Httpd-Official-Image-_-Docker-Hub-%25E2%2580%2594-Mozilla-Firefox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RXUZtW_n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_33_05-Httpd-Official-Image-_-Docker-Hub-%25E2%2580%2594-Mozilla-Firefox.png" alt="docker registry search"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;The other option is to look for the image using the docker search command.&lt;/p&gt;

&lt;p&gt;docker search &lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FzirEW71--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_35_11-aws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FzirEW71--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_35_11-aws.png" alt=""&gt;&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;The pull command has following options&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;ubuntu@ip-172-31-1-61:~$ docker pull --help

Usage: docker pull [OPTIONS] NAME[:TAG|@DIGEST]

Pull an image or a repository from a registry

Options:
-a, --all-tags Download all tagged images in the repository
--disable-content-trust Skip image verification (default true)
--platform string Set platform if server is multi-platform capable
-q, --quiet Suppress verbose output&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;To pull the image, you can use the pull command, the syntax is&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;pre&gt;docker pull &amp;lt;image:tag&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Example:&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt; &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wO5Q3sId--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_35_34-aws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wO5Q3sId--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_35_34-aws.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Now you can check the images in your docker host.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3Vc3JJI2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_38_42-aws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3Vc3JJI2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dailytechlearning.com/wp-content/uploads/2021/08/2021-08-07-15_38_42-aws.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;Please share your thoughts, about the docker pull command.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Two-Tier WordPress architecture based on Containers</title>
      <dc:creator>Daily Tech Learning</dc:creator>
      <pubDate>Wed, 04 Aug 2021 10:47:43 +0000</pubDate>
      <link>https://dev.to/dailytechlearning/two-tier-wordpress-architecture-based-on-containers-3jf2</link>
      <guid>https://dev.to/dailytechlearning/two-tier-wordpress-architecture-based-on-containers-3jf2</guid>
      <description>&lt;p&gt;This is a beginners level exercise for hosting a two-tier architecture on Docker Containers. WordPress is a monolithic application which was designed to work on shared servers, however to utilize the advantages of micro services, we need to segregate the data layer and the processing layer.&lt;/p&gt;

&lt;p&gt;The first split is to split the database and the web application handled by WordPress. The architecture that we are going to deploy is as follows&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dvuPGVHm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AOkW9CNab5pe8q5HZLz6cDw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dvuPGVHm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AOkW9CNab5pe8q5HZLz6cDw.png"&gt;&lt;/a&gt;Two tier WordPress architecture based on Docker Containers&lt;p&gt;&lt;/p&gt;

&lt;p&gt;To deploy this architecture, we are going to use the following Docker community images.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hub.docker.com/_/mysql/" rel="noopener"&gt;Mysql — Official Image | Docker Hub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hub.docker.com/_/wordpress/" rel="noopener"&gt;Wordpress — Official Image | Docker Hub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First of all, we can search the images, using the &lt;em&gt;docker search&lt;/em&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xHL1CwWV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AKAfwMtJsItGwJ1UvI8Z6aw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xHL1CwWV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AKAfwMtJsItGwJ1UvI8Z6aw.png" alt="using docker search to look for mysql images"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yq8WK_Ge--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ATaUDIY9NO-G1dWPdlhOakA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yq8WK_Ge--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2ATaUDIY9NO-G1dWPdlhOakA.png" alt="Using docker search to find wordpress image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we can pull the desired images using &lt;em&gt;docker pull&lt;/em&gt;&lt;/p&gt;

&lt;pre&gt;&lt;em&gt;docker pull mysql&lt;/em&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8O0XLI4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A5jQ-88Q37l8PX3NcNOV-QQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8O0XLI4e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A5jQ-88Q37l8PX3NcNOV-QQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;em&gt;docker pull wordpress&lt;/em&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ECyPPDa9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AS1JKwURWZfVWsLlEpBkUUA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ECyPPDa9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AS1JKwURWZfVWsLlEpBkUUA.png" alt="docker pull wordpress"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The next step is to create a custom network&lt;/p&gt;

&lt;pre&gt;&lt;em&gt;docker network create — subnet 192.168.10.0/24 — driver bridge webapp&lt;/em&gt;&lt;/pre&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FBlyvryT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A7M13l4e9MniaxpgS4PT8wg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FBlyvryT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A7M13l4e9MniaxpgS4PT8wg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;The network can be verified in the &lt;em&gt;ip addr&lt;/em&gt; command as well.&lt;/h4&gt;

&lt;p&gt;&lt;/p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tP0zAtff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AxZOru2ukR-Rjl9dV3SDhgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tP0zAtff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AxZOru2ukR-Rjl9dV3SDhgw.png"&gt;&lt;/a&gt;ip address will show the custom network created&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now we have a custom network created, we can spin up our containers with the required configuration&lt;/p&gt;

&lt;pre&gt;&lt;em&gt;docker run -it — name wpdb_mysql — network webapp -e MYSQL_ROOT_PASSWORD=LHSWCVAbzS -d mysql:latest&lt;/em&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--esyDNT8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A7B579N04EsFVlOwxQTWzfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--esyDNT8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2A7B579N04EsFVlOwxQTWzfw.png" alt="starting the mysql container"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are going to use a custom port 8081 to expose it to the world for our WordPress server. The other parameters include the configuration of mySql database server. Node that as we are using a custom bridged network, in the host, I have just provided the container name as it would be accessible by name as well.&lt;/p&gt;

&lt;pre&gt;docker run — name wp — network webapp -p 8081:80 -e WORDPRESS_DB_HOST=wpdb_mysql -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=LHSWCVAbzS -e WORDPRESS_DB_NAME=wpdb -d wordpress&lt;/pre&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1KetyAPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AaTmV3205nTI_lqcOTodHIg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1KetyAPg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2AaTmV3205nTI_lqcOTodHIg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you can access your freshly installed website on your favorite browser as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Huk4POHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2APGHKQ-4jQPSJtP15T7iTMw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Huk4POHV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/800/1%2APGHKQ-4jQPSJtP15T7iTMw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this tutorial, I just covered splitting up of the database and web application provided by WordPress using containers in a custom bridged network. Please provide your feedback for any scope of improvements.&lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>docker</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
