<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Docker lamp Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/docker-lamp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 12 Feb 2019 21:39:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install latest  wordpress in Docker</title>
		<link>https://www.osradar.com/install-latest-wordpress-in-docker/</link>
					<comments>https://www.osradar.com/install-latest-wordpress-in-docker/#respond</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Tue, 12 Feb 2019 21:39:13 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[Docker lamp]]></category>
		<category><![CDATA[Docker wordpress]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=9185</guid>

					<description><![CDATA[<p>Docker is the future, its  introduced everywhere and you are able to deploy quickly  many containers applications in few minutes. i will show in this article the best way to install  fully wordpress in few minutes . please follow the instructions bellow. To install the basic Docker please follow this article: How to install Docker  [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-latest-wordpress-in-docker/">Install latest  wordpress in Docker</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Docker is the future, its  introduced everywhere and you are able to deploy quickly  many containers applications in few minutes. i will show in this article the best way to install  fully wordpress in few minutes . please follow the instructions bellow.</p>
<p>To install the basic Docker please follow this article:</p>
<p><a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/">How to install Docker </a></p>
<p>Now lets deploy the first application, How to deploy wordpress in Docker.</p>
<h3><strong>1-What we need</strong></h3>
<p>WordPress needs a LAMP stack to run. In this process, we are splitting that LAMP stack into two containers: one that runs the database (MySQL or MariaDB), and one that runs the webserver (PHP with Apache or PHP with Nginx).</p>
<p>Paste the YAML configuration  like this:</p>
<p>vi Install-wordpress.yaml</p>
<p>add the following :</p>
<pre class="">version: '3.1'

services:

wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: example

mysql:
image: mysql:8
command: '--default-authentication-plugin=mysql_native_password'
# common options
restart: always
environment:
MYSQL_ROOT_PASSWORD: example</pre>
<p>save and exit</p>
<p>docker-compose up will  build the images/containers for you and will bring everything up in seconds.</p>
<h3><strong>2-Install Docker-composer</strong></h3>
<p>Docker-composer orchestrator dont exist on basic repo of Centos . to do this you need to add the epel repos</p>
<pre class=""> yum install epel-release</pre>
<pre class="">yum install docker-compose</pre>
<p>&nbsp;</p>
<p>To user docker-compse orchestrator you have to use the created yaml configuration file.</p>
<p><strong>Lets  start</strong></p>
<pre class="">[root@osradar ~]# docker-compose -f Install-wordpress.yaml up &amp;
Pulling mysql (mysql:8)...
Trying to pull repository docker.io/library/mysql ...
8: Pulling from docker.io/library/mysql
6ae821421a7d: Pull complete
a9e976e3aa6d: Pull complete
e3735e44a020: Pull complete
bfd564e9483f: Pull complete
df705f26e488: Pull complete
0c5547f73d62: Pull complete
f437382cf8a1: Pull complete
b8e2d50f1513: Pull complete
e2e3c9928180: Pull complete
b60db6d282cd: Pull complete
1d32deab69c6: Pull complete
408a40cd2e9c: Pull complete
Digest: sha256:a571337738c9205427c80748e165eca88edc5a1157f8b8d545fa127fc3e29269
Status: Downloaded newer image for docker.io/mysql:8
Pulling wordpress (wordpress:latest)...
Trying to pull repository docker.io/library/wordpress ...
latest: Pulling from docker.io/library/wordpress</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-10763" src="https://www.osradar.com/wp-content/uploads/2019/02/docker11-a.png" alt="" width="808" height="367" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker11-a.png 808w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-a-300x136.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-a-768x349.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-a-696x316.png 696w" sizes="(max-width: 808px) 100vw, 808px" /></p>
<h3><strong>3-Start The Configuration</strong></h3>
<p><strong>Check if the containers are Up</strong></p>
<pre class="">[root@osradar ~]# docker container ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
908afa6b30e5 wordpress "docker-entrypoint..." 55 minutes ago Up 41 minutes 0.0.0.0:8080-&gt;80/tcp root_wordpress_1
6fe7fb727fc8 mysql:8 "docker-entrypoint..." 55 minutes ago Up 41 minutes 3306/tcp, 33060/tcp root_mysql_1
[root@osradar ~]#</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-10765" src="https://www.osradar.com/wp-content/uploads/2019/02/docker11-b.png" alt="" width="1200" height="90" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker11-b.png 1200w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-b-300x23.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-b-768x58.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-b-1024x77.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-b-696x52.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-b-1068x80.png 1068w" sizes="(max-width: 1200px) 100vw, 1200px" /></p>
<p>lunch  the browser  to  IP:8080 to  go a head   for  the  installation :</p>
<p><img loading="lazy" class="alignnone size-full wp-image-10766" src="https://www.osradar.com/wp-content/uploads/2019/02/docker12.png" alt="" width="1078" height="751" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker12.png 1078w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-300x209.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-768x535.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-1024x713.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-696x485.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-1068x744.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/docker12-603x420.png 603w" sizes="(max-width: 1078px) 100vw, 1078px" /> <img loading="lazy" class="alignnone size-full wp-image-10767" src="https://www.osradar.com/wp-content/uploads/2019/02/docker13.png" alt="" width="991" height="831" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker13.png 991w, https://www.osradar.com/wp-content/uploads/2019/02/docker13-300x252.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker13-768x644.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker13-696x584.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker13-501x420.png 501w" sizes="(max-width: 991px) 100vw, 991px" /> <img loading="lazy" class="alignnone size-full wp-image-10768" src="https://www.osradar.com/wp-content/uploads/2019/02/docker14.png" alt="" width="986" height="680" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker14.png 986w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-300x207.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-768x530.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-696x480.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker14-609x420.png 609w" sizes="(max-width: 986px) 100vw, 986px" /> <img loading="lazy" class="alignnone size-full wp-image-10769" src="https://www.osradar.com/wp-content/uploads/2019/02/docker15.png" alt="" width="1258" height="753" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker15.png 1258w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-300x180.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-768x460.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-1024x613.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-696x417.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-1068x639.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/docker15-702x420.png 702w" sizes="(max-width: 1258px) 100vw, 1258px" /> <img loading="lazy" class="alignnone size-full wp-image-10770" src="https://www.osradar.com/wp-content/uploads/2019/02/docker16.png" alt="" width="1216" height="882" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker16.png 1216w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-300x218.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-768x557.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-1024x743.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-324x235.png 324w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-696x505.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-1068x775.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/docker16-579x420.png 579w" sizes="(max-width: 1216px) 100vw, 1216px" /></p>
<p>How to Access The WordPress  Files  in Docker</p>
<p>docker exec -it Container-ID  &#8220;/bin/bash&#8221;</p>
<p><img loading="lazy" class="alignnone size-full wp-image-10771" src="https://www.osradar.com/wp-content/uploads/2019/02/docker11-c.png" alt="" width="1219" height="502" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker11-c.png 1219w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-300x124.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-768x316.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-1024x422.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-696x287.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-1068x440.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-c-1020x420.png 1020w" sizes="(max-width: 1219px) 100vw, 1219px" /></p>
<p><strong>How to Edit WordPress files in Docker</strong></p>
<p>Docker containers are debian based  , you can use command apt or apt-get to   install packages</p>
<pre class="">apt-get  update &amp;  apt-get  install  vim nano</pre>
<p><strong>How to access mysql Container and check the database</strong></p>
<pre class="">apt-get  update &amp;  apt-get  mysql-client</pre>
<p>Connect to the database using  user root  , password is example</p>
<pre class="">root@6fe7fb727fc8:/# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 8.0.15 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql&gt; show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
| wordpress |
+--------------------+
5 rows in set (0.00 sec)</pre>
<p><img loading="lazy" class="alignnone size-full wp-image-10774" src="https://www.osradar.com/wp-content/uploads/2019/02/docker11-d.png" alt="" width="1414" height="902" srcset="https://www.osradar.com/wp-content/uploads/2019/02/docker11-d.png 1414w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-300x191.png 300w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-768x490.png 768w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-1024x653.png 1024w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-696x444.png 696w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-1068x681.png 1068w, https://www.osradar.com/wp-content/uploads/2019/02/docker11-d-658x420.png 658w" sizes="(max-width: 1414px) 100vw, 1414px" /></p>
<p>Notice :  To detach the tty without exiting the shell, use the escape sequence Ctrl+p + Ctrl+q</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-latest-wordpress-in-docker/">Install latest  wordpress in Docker</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-latest-wordpress-in-docker/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
