<?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 compose Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/docker-compose/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Wed, 18 Dec 2019 19:59:53 +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>How to deploy ArangoDB using Docker Compose?</title>
		<link>https://www.osradar.com/arangodb-using-docker-compose/</link>
					<comments>https://www.osradar.com/arangodb-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 20 Dec 2019 23:30:00 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ArangoDB]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16642</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy ArangoDB using Docker compose. It will be brief but explained step by step. Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/arangodb-using-docker-compose/">How to deploy ArangoDB using Docker Compose?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>Hello. In this post, I will teach you how to deploy ArangoDB using Docker compose. It will be brief but explained step by step.</strong></p>



<p>Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a rel="noreferrer noopener" href="https://www.osradar.com/tag/docker/" target="_blank"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>



<p><a rel="noreferrer noopener" aria-label="ArangoDB (opens in a new tab)" href="https://www.arangodb.com/" target="_blank">ArangoDB</a> is a native multi-model, open-source database with flexible data models for documents, graphs, and key-values. Build high-performance applications using a convenient SQL-like query language or JavaScript extensions. Use ACID transactions if you require them. Scale horizontally and vertically with a few mouse clicks.</p>



<p>So, let us start.</p>



<h2>Install Docker and Docker Compose on Linux</h2>



<p>The first step is to have Docker installed in the system, obviously.</p>



<ul><li>If you are using Ubuntu: <a href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank" rel="noreferrer noopener">How to install Docker on Ubuntu 18.04?</a></li><li>For CentOS 8: <a href="https://www.osradar.com/install-docker-centos-8/" target="_blank" rel="noreferrer noopener">How to install Docker on CentOS 8?</a></li><li>For CentOS 7: <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank" rel="noreferrer noopener">How to install Docker CE on CentOS 7?</a></li><li>If you use Windows: <a href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank" rel="noreferrer noopener">How to install Docker in Windows 10?</a></li><li>Or, if you are using Debian 10: <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener">How to install Docker on Debian 10?</a></li></ul>



<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>



<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>



<p>For Debian, Ubuntu, and derivatives.</p>



<pre class="wp-block-preformatted">:~$ sudo dnf install docker-compose</pre>



<p>Or, for RHEL, CentOS and derivatives.</p>



<h2>Deploy ArangoDB using Docker Compose</h2>



<p>First, I will create a folder called <code>arangodb</code> and within it a file called <code>docker-compose.yml</code> which is where we will add the instructions.</p>



<pre class="wp-block-preformatted">:~$ mkdir arangodb
:~$ cd arangodb</pre>



<p>Now we&#8217;ll create the docker-compose file and add the following:</p>



<pre class="wp-block-preformatted">:~$ nano docker-compose.yml</pre>



<pre class="wp-block-preformatted">version: '3.1'
 services:
 arangodb:
     image: arangodb:latest
     restart: always
     ports:
       - 1234:8529
     environment:
       ARANGO_ROOT_PASSWORD: angelo123osradar
     volumes:
       - /home/angelo/arangodb_data:/var/lib/arangodb3</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="849" height="323" src="https://www.osradar.com/wp-content/uploads/2019/12/1-7.png" alt="1.- The docker compose file" class="wp-image-16643" srcset="https://www.osradar.com/wp-content/uploads/2019/12/1-7.png 849w, https://www.osradar.com/wp-content/uploads/2019/12/1-7-300x114.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/1-7-768x292.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/1-7-696x265.png 696w" sizes="(max-width: 849px) 100vw, 849px" /><figcaption>1.- The docker-compose file</figcaption></figure>



<p>Now we proceed to explain. First, I&#8217;m using the latest version of ArangoDB. Then, I expose port 8529 which is the image port to 1234 of our host system.  You can use another port if you want.</p>



<p>On the other hand, in the environment section, I define an initial password for the root user. And a volume to access the container data. I have chosen <code>/home/angelo/arangodb_data</code> but you choose the one you want. Remember that before you raise the image you must create it.</p>



<p>Then, create the data folder and start the deployment.</p>



<pre class="wp-block-preformatted">:~$ mkdir<code>/home/angelo/arangodb_data</code></pre>



<pre class="wp-block-preformatted">:~$ sudo docker-compose up -d</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="733" height="281" src="https://www.osradar.com/wp-content/uploads/2019/12/2-6.png" alt="2.- Deploy ArangoDB using docker compose" class="wp-image-16644" srcset="https://www.osradar.com/wp-content/uploads/2019/12/2-6.png 733w, https://www.osradar.com/wp-content/uploads/2019/12/2-6-300x115.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/2-6-696x267.png 696w" sizes="(max-width: 733px) 100vw, 733px" /><figcaption>2.- Deploy ArangoDB using docker compose</figcaption></figure>



<p>When you finish, you can access the ArangoDB web interface. Open your browser and go to <code>http://your-server:1234</code>. You will see the following:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="502" src="https://www.osradar.com/wp-content/uploads/2019/12/3-7-1024x502.png" alt="3.- ArangoDB working" class="wp-image-16645" srcset="https://www.osradar.com/wp-content/uploads/2019/12/3-7-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/12/3-7-858x420.png 858w, https://www.osradar.com/wp-content/uploads/2019/12/3-7.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- ArangoDB working</figcaption></figure>



<p>Then, type your credentials. Keep in mind that the default user is root. After that, you will see this:</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="502" src="https://www.osradar.com/wp-content/uploads/2019/12/4-5-1024x502.png" alt="4.- Selecting the database after the log in" class="wp-image-16646" srcset="https://www.osradar.com/wp-content/uploads/2019/12/4-5-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/12/4-5-858x420.png 858w, https://www.osradar.com/wp-content/uploads/2019/12/4-5.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>4.- Selecting the database</figcaption></figure>



<p>Finally, you will see the dashboard.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="502" src="https://www.osradar.com/wp-content/uploads/2019/12/5-5-1024x502.png" alt="5.- ArangoDB deployed using docker compose" class="wp-image-16647" srcset="https://www.osradar.com/wp-content/uploads/2019/12/5-5-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/12/5-5-858x420.png 858w, https://www.osradar.com/wp-content/uploads/2019/12/5-5.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>5.- ArangoDB deployed using docker compose</figcaption></figure>



<p>And that is it.</p>



<h2>Conclusion</h2>



<p>ArangoDB is a NoSQL database manager quite important in the current market. Deploying ArangoDB using Docker compose is simple but with many options available.</p>



<p>If you want more information, I recommend you to visit the <a href="https://hub.docker.com/_/arangodb" target="_blank" rel="noreferrer noopener" aria-label="official documentation of the image. (opens in a new tab)">official documentation of the image.</a></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/arangodb-using-docker-compose/">How to deploy ArangoDB using Docker Compose?</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/arangodb-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Deploy owncloud using Docker compose</title>
		<link>https://www.osradar.com/deploy-owncloud-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-owncloud-using-docker-compose/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 06 Dec 2019 00:01:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Owncloud]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16069</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy Owncloud using Docker compose. It will be brief but explained step by step. Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-owncloud-using-docker-compose/">Deploy owncloud using Docker compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Hello. In this post, I will teach you how to deploy Owncloud using Docker compose. It will be brief but explained step by step.</strong></p>
<p>Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a href="https://www.osradar.com/tag/docker/" target="_blank" rel="noreferrer noopener" aria-label="ocker  (opens in a new tab)"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>
<p><a href="https://owncloud.org/" target="_blank" rel="noopener noreferrer">Owncloud</a> is one of the best-known solutions to create our own private cloud as if it were a professional service. Of course, by this I do not mean that Owncloud is not professional, I mean that its behavior is similar to that of proprietary solutions such as <a href="https://www.osradar.com/install-odrive-on-ubuntu-18-04/" target="_blank" rel="noopener noreferrer">Google Drive</a> or <a href="https://www.osradar.com/sync-microsoft-onedrive-with-linux/" target="_blank" rel="noopener noreferrer">OneDrive</a>.</p>
<p>So let’s get to work.</p>
<h2>Install Docker and Docker Compose on Linux</h2>
<p>The first step is to have Docker installed in the system, obviously.</p>
<ul>
<li>If you are using Ubuntu: <a href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank" rel="noreferrer noopener">How to install Docker on Ubuntu 18.04?</a></li>
<li>For CentOS 8: <a href="https://www.osradar.com/install-docker-centos-8/" target="_blank" rel="noreferrer noopener">How to install Docker on CentOS 8?</a></li>
<li>For CentOS 7: <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank" rel="noreferrer noopener">How to install Docker CE on CentOS 7?</a></li>
<li>If you use Windows: <a href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank" rel="noreferrer noopener">How to install Docker in Windows 10?</a></li>
<li>Or, if you are using Debian 10: <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener">How to install Docker on Debian 10?</a></li>
</ul>
<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>
<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>
<p>For Debian, Ubuntu, and derivatives.</p>
<pre class="wp-block-preformatted">:~$ sudo dnf install docker-compose</pre>
<p>Or, for RHEL, CentOS and derivatives.</p>
<h2>Deploy Owncloud using Docker compose</h2>
<p>Well, the first step is to create a new folder where we will do the process.</p>
<pre>:~$ mkdir owncloud<br>:~$ cd owncloud</pre>
<p>Then, in that folder create a new file called docker-compose.yml that contains all the instructions for deployment. When you create it, add the following:</p>
<pre>:~$ sudo nano docker-compose.yml</pre>
<pre>version: '3.1'<br><br>services:<br><br>  owncloud:<br>    image: owncloud<br>    restart: always<br>    ports:<br>      - 1234:80<br>    volumes:<br>      - /home/angelo/owncloud_data:/var/www/html<br>      - /home/angelo/owncloud_data/apps:/var/www/html/apps<br>      - /home/angelo/owncloud_data/config:/var/www/html/config<br>      - /home/angelo/owncloud_data/data:/var/www/html/data<br><br>  db:<br>    image: mariadb<br>    restart: always<br>    environment:<br>      MYSQL_ROOT_PASSWORD: angelo123</pre>
<figure id="attachment_16140" aria-describedby="caption-attachment-16140" style="width: 903px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-16140" src="https://www.osradar.com/wp-content/uploads/2019/11/1-21.png" alt="1.- Deploy Owncloud using Docker compose" width="903" height="469" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-21.png 903w, https://www.osradar.com/wp-content/uploads/2019/11/1-21-300x156.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-21-768x399.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-21-696x361.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-21-809x420.png 809w" sizes="(max-width: 903px) 100vw, 903px" /><figcaption id="caption-attachment-16140" class="wp-caption-text">1.- Deploy Owncloud using Docker compose</figcaption></figure>
<p>I proceed to explain.</p>
<p>In this file, we will raise two services. The first is the Owncloud. The image is configured for Owncloud to run on port 80, but I exposed port 1234. You can set the number you want but don&#8217;t touch 80.</p>
<p>Then come the volumes. The first part is folders on our host system to make sure the data is persistent.<strong> These folders must be created before the services are deployed.</strong></p>
<p>After this, comes the second service. By default, the Owncloud image is configured to use SQLite. But in this case, we have decided to use MariaDB. All simple just set up an initial key and you&#8217;re done.</p>
<p>Let us create the volume folders.</p>
<pre>:~$ mkdir /home/angelo/owncloud_data<br>:~$ mkdir /home/angelo/owncloud_data/apps<br>:~$ mkdir /home/angelo/owncloud_data/config<br>:~$ mkdir /home/angelo/owncloud_data/data</pre>
<p>Then, run Docker Compose.</p>
<pre>:~$ sudo docker-compose up -d</pre>
<p>That&#8217;s enough. Now open your web browser and go to <code>http://your-server:1234</code> and you will see the following. Create an admin account.</p>
<figure id="attachment_16141" aria-describedby="caption-attachment-16141" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-16141" src="https://www.osradar.com/wp-content/uploads/2019/11/2-20.png" alt="2.- Owncloud running" width="1354" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-20.png 1354w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/2-20-850x420.png 850w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-16141" class="wp-caption-text">2.- Owncloud running</figcaption></figure>
<p>Next, configure the Database.</p>
<figure id="attachment_16142" aria-describedby="caption-attachment-16142" style="width: 1354px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-16142" src="https://www.osradar.com/wp-content/uploads/2019/11/3-19.png" alt="3.- Configuring the owncloud database" width="1354" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-19.png 1354w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/3-19-850x420.png 850w" sizes="(max-width: 1354px) 100vw, 1354px" /><figcaption id="caption-attachment-16142" class="wp-caption-text">3.- Configuring the owncloud database</figcaption></figure>
<p>Finally, you&#8217;ll see the login screen and you are done. You can now use Owncloud.</p>
<h2>Conclusion</h2>
<p>Owncloud is a really useful application. And to deploy it using Docker compose is something easy and within everyone&#8217;s reach.</p>
<p>For more information on this, see the <a href="https://hub.docker.com/_/owncloud" target="_blank" rel="noopener noreferrer">official documentation of the Owncloud Docker image</a>.</p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-owncloud-using-docker-compose/">Deploy owncloud using Docker compose</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/deploy-owncloud-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Deploy MySQL using Docker Compose</title>
		<link>https://www.osradar.com/deploy-mysql-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-mysql-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Wed, 20 Nov 2019 23:18:18 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[adminer]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15624</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step. Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Hello. In this post, I will teach you how to deploy MySQL using Docker compose. It will be brief but explained step by step.</strong></p>
<p>Briefly, I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a href="https://www.osradar.com/tag/docker/" target="_blank" rel="noreferrer noopener" aria-label="ocker  (opens in a new tab)"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>
<p>Remember that it is always possible to install MySQL on a server using your precompiled packages, we can easily have the latest version available.</p>
<p>For this tutorial, apart from MySQL, we will also deploy <a href="https://www.osradar.com/install-adminer-debian-10/" target="_blank" rel="noopener noreferrer">Adminer that we talked about earlier</a>. Together you will be able to manage a MySQL server without problems.</p>
<p>So let&#8217;s get to work.</p>
<h2>Install Docker and Docker Compose on Linux</h2>
<p>The first step is to have Docker installed in the system, obviously.</p>
<ul>
<li>If you are using Ubuntu: <a href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank" rel="noreferrer noopener">How to install Docker on Ubuntu 18.04?</a></li>
<li>For CentOS 8: <a href="https://www.osradar.com/install-docker-centos-8/" target="_blank" rel="noreferrer noopener">How to install Docker on CentOS 8?</a></li>
<li>For CentOS 7: <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank" rel="noreferrer noopener">How to install Docker CE on CentOS 7?</a></li>
<li>If you use Windows: <a href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank" rel="noreferrer noopener">How to install Docker in Windows 10?</a></li>
<li>Or, if you are using Debian 10: <a href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank" rel="noreferrer noopener">How to install Docker on Debian 10?</a></li>
</ul>
<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>
<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>
<p>For Debian, Ubuntu and derivatives.</p>
<pre class="wp-block-preformatted">:~$ sudo dnf install docker-compose</pre>
<p>Or, for RHEL, CentOS and derivatives.</p>
<h2>Deploy MySQL using Docker Compose</h2>
<p>Well, it&#8217;s time to work. First create a folder called mysql and access it.</p>
<pre>:~$ mkdir mysql<br />:~$ cd mkdir</pre>
<p>Inside it, we will create the docker compose file called <code>docker-compose.yml</code>.</p>
<pre>:~$ nano docker-compose.yml</pre>
<p>Once you have created the file, you need to add the following content:</p>
<pre>version: '3.1'<br /><br />services:<br /><br />  db:<br />    image: mysql:latest<br />    command: --default-authentication-plugin=mysql_native_password<br />    restart: always<br />    environment:<br />      MYSQL_ROOT_PASSWORD: angelo123<br />      MYSQL_DATABASE: example<br />      MYSQL_USER: angelo<br />      MYSQL_PASSWORD: angelo123<br />    volumes:<br />      /home/angelo/mysqldata:/var/lib/mysql<br /><br />  adminer:<br />    image: adminer<br />    restart: always<br />    ports:<br />      - 8080:8080</pre>
<figure id="attachment_15687" aria-describedby="caption-attachment-15687" style="width: 870px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15687" src="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png" alt="1.- Docker compose file to deploy MySQL" width="870" height="445" srcset="https://www.osradar.com/wp-content/uploads/2019/11/1-12.png 870w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-300x153.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-768x393.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-696x356.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/1-12-821x420.png 821w" sizes="(max-width: 870px) 100vw, 870px" /><figcaption id="caption-attachment-15687" class="wp-caption-text">1.- Docker compose file to deploy MySQL</figcaption></figure>
<p>I now proceed to explain briefly.</p>
<p>First, we deploy a service called db that contains the information to install MySQL. First, we use the image of the latest version of MySQL. Inside the environment section we define the necessary variables to start the service. In this section, you define things<strong> like the password of the root user, the regular user and the user name as well as the name of the initial database.</strong></p>
<p>An important aspect is the volume that allows us to have access to the database in the host system. This folder must be created before the execution of the file.</p>
<p>In the end, we deploy Adminer using port 8080, obviously you can change this.</p>
<p>So, create the volume folder:</p>
<pre>:~$ mkdir /home/angelo/mysqldata</pre>
<p>Then, run Docker Compose.</p>
<pre>:~$ sudo docker-compose up -d</pre>
<figure id="attachment_15688" aria-describedby="caption-attachment-15688" style="width: 1039px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15688" src="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png" alt="2.- Deploy MySQL using Docker compose" width="1039" height="716" srcset="https://www.osradar.com/wp-content/uploads/2019/11/2-12.png 1039w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-300x207.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-768x529.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-1024x706.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-696x480.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/2-12-609x420.png 609w" sizes="(max-width: 1039px) 100vw, 1039px" /><figcaption id="caption-attachment-15688" class="wp-caption-text">2.- Deploy MySQL using Docker compose</figcaption></figure>
<p>So, now you can open your favorite web browser and go to <code>http://your-server:8080</code> to access Adminer. Remember that port has to be open in the firewall.</p>
<figure id="attachment_15689" aria-describedby="caption-attachment-15689" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15689" src="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png" alt="3.- Adminer Working" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/3-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/3-11-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15689" class="wp-caption-text">3.- Adminer Working</figcaption></figure>
<p>Now, type in your MySQL credentials and log in. These are the ones we define in the Docker compose file.</p>
<figure id="attachment_15690" aria-describedby="caption-attachment-15690" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-15690" src="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png" alt="4.- MySQL running using Docker Compose" width="1366" height="669" srcset="https://www.osradar.com/wp-content/uploads/2019/11/4-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/11/4-9-858x420.png 858w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-15690" class="wp-caption-text">4.- MySQL running using Docker Compose</figcaption></figure>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>Docker is a technology with enormous potential. It helps a lot in the deployment of applications without many dependency problems. Today in this tutorial we have deployed MySQL and Adminer without many problems.</p>
<p>For more information about the use of the MySQL image, please consult the <a href="https://dev.mysql.com/doc/mysql-installation-excerpt/8.0/en/docker-mysql-more-topics.html" target="_blank" rel="noopener noreferrer">official documentation.</a></p>


<p></p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-mysql-using-docker-compose/">Deploy MySQL using Docker Compose</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/deploy-mysql-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Deploy PHPMyAdmin using Docker Compose</title>
		<link>https://www.osradar.com/deploy-phpmyadmin-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-phpmyadmin-using-docker-compose/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 31 Oct 2019 23:49:10 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=15131</guid>

					<description><![CDATA[<p>Hello. In this post, I will teach you how to deploy PHPMyAdmin using Docker compose. It will be brief but explained step by step. I have to admit that these last days I have liked much more the technology of Docker compose. It seems a very simple and fast way to install certain applications. However, [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-phpmyadmin-using-docker-compose/">Deploy PHPMyAdmin using Docker Compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><strong>Hello. In this post, I will teach you how to deploy PHPMyAdmin using Docker compose. It will be brief but explained step by step.</strong></p>



<p>I have to admit that these last days I have liked much more the technology of Docker compose. It seems a very simple and fast way to install certain applications. However, from my point of view, a bit of flexibility is lost in the configurations since they are images already created from a base. Of course, we will be able to configure some things but not everything.</p>



<p>Well, <a href="https://www.phpmyadmin.net/" target="_blank" rel="noreferrer noopener" aria-label="PHPMyAdmin (opens in a new tab)">PHPMyAdmin</a> is an application that is quite easy to install in Linux because it is available in most of the official refuels of the distributions. However, installing the latest version available from its source code may frighten some users. So this is a good way to install it.</p>



<p>Briefly<g class="gr_ gr_32 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="32" data-gr-id="32">,</g> I will tell you that Docker compose is more thought of production environments where compatibility should be as high as possible. This is precisely the great advantage of Docker images that we will be able to use in any supported system thanks to the technology of containers. Then,<strong> these steps can be done from any Linux distribution that has installed </strong><a rel="noreferrer noopener" aria-label="ocker  (opens in a new tab)" href="https://www.osradar.com/tag/docker/" target="_blank"><strong>Docker </strong></a><strong>and Docker Compose.</strong></p>



<p>So, let us start.</p>



<h2>Install Docker and Docker Compose on Linux</h2>



<p>The first step is to have Docker installed in the system, obviously. </p>



<ul><li>If you are using Ubuntu: <a rel="noreferrer noopener" href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank">How to install Docker on Ubuntu 18.04?</a></li><li>For CentOS 8: <a rel="noreferrer noopener" href="https://www.osradar.com/install-docker-centos-8/" target="_blank">How to install Docker on CentOS 8?</a></li><li>For CentOS 7: <a rel="noreferrer noopener" href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank">How to install Docker CE on CentOS 7?</a></li><li>If you use Windows: <a rel="noreferrer noopener" href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank">How to install Docker in Windows 10?</a></li><li>Or, if you are using Debian 10: <a rel="noreferrer noopener" href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank">How to install Docker on Debian 10?</a></li></ul>



<p>And using your distribution’s package manager, you can install Docker Compose. For example:</p>



<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>



<p>For Debian, Ubuntu and derivatives.</p>



<pre class="wp-block-preformatted">:~$ sudo yum install docker-compose</pre>



<p>Or, for RHEL, CentOS and derivatives.</p>



<h2>Install PHPMyAdmin using Docker Compose</h2>



<p>The official PHPMyAdmin image requires the <a rel="noreferrer noopener" aria-label="MySQL (opens in a new tab)" href="https://www.osradar.com/tag/mysql/" target="_blank">MySQL</a> or <a rel="noreferrer noopener" aria-label="MariaDB (opens in a new tab)" href="https://www.osradar.com/tag/mariadb/" target="_blank">MariaDB</a> image to be installed. Anyway, in the docker-compose file, I will also add it in case you do not have it installed.</p>



<p>First, I will create a new folder and within it I will create the <code>docker-compose.yml</code> file.</p>



<pre class="wp-block-preformatted">:~$ mkdir phpmyadmin
:~$ cd phpmyadmin</pre>



<figure class="wp-block-image"><img loading="lazy" width="682" height="105" src="https://www.osradar.com/wp-content/uploads/2019/10/1-23.png" alt="1.- Creating a folder" class="wp-image-15133" srcset="https://www.osradar.com/wp-content/uploads/2019/10/1-23.png 682w, https://www.osradar.com/wp-content/uploads/2019/10/1-23-300x46.png 300w" sizes="(max-width: 682px) 100vw, 682px" /><figcaption>1.- Creating a folder</figcaption></figure>



<p>Then, create the file and add the following:</p>



<pre class="wp-block-preformatted">:~$ nano docker-compose.yml</pre>



<pre class="wp-block-preformatted">version: '2'

  volumes:
    db:

  services:
    db:
      image: mariadb
      command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      restart: always
      volumes:
        - db:/var/lib/mysql
      environment:
        - MYSQL_ROOT_PASSWORD=1234osradar
        - MYSQL_PASSWORD=1234osradar
        - MYSQL_DATABASE=example    
        - MYSQL_USER=osradar
  app:
     image: phpmyadmin/phpmyadmin
     container_name: phpmyadmin
     environment:
      - PMA_ARBITRARY=1
     restart: always
     links:
      - db
     ports:
      - 8080:80
     volumes:
      - /sessions</pre>



<figure class="wp-block-image"><img loading="lazy" width="928" height="576" src="https://www.osradar.com/wp-content/uploads/2019/10/2-21.png" alt="2.- The Docker-compose file for PHPMyAdmin" class="wp-image-15134" srcset="https://www.osradar.com/wp-content/uploads/2019/10/2-21.png 928w, https://www.osradar.com/wp-content/uploads/2019/10/2-21-300x186.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/2-21-768x477.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/2-21-356x220.png 356w, https://www.osradar.com/wp-content/uploads/2019/10/2-21-696x432.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/2-21-677x420.png 677w" sizes="(max-width: 928px) 100vw, 928px" /><figcaption>2.- The Docker-compose file for PHPMyAdmin</figcaption></figure>



<p>Save the changes and close the file.</p>



<p>The file itself is explicit but we are going to explain the most important parts. In the image we can see that we will try to raise two services: one is mariadb and the other PHPMyAdmin.</p>



<p>First we configure MariaDB that will work as the database manager. And we configured the environment variables that will allow us to define the password of the root user, the normal user and the user name.</p>



<p>In the case of PHPMyAdmin is even simpler because by default only requires that we specify within the environment if it is an arbitrary host. Then, we define the port where we will have access, in this case, I left the 8080. All better explained in the <a rel="noreferrer noopener" aria-label="official documentation of the PHPMyAdmin image (opens in a new tab)" href="https://github.com/phpmyadmin/docker" target="_blank">official documentation of the PHPMyAdmin image</a>.</p>



<p>Finally, run docker compose to install PHPMyAdmin.</p>



<pre class="wp-block-preformatted">:~$ sudo docker-compose up -d</pre>



<figure class="wp-block-image"><img loading="lazy" width="858" height="505" src="https://www.osradar.com/wp-content/uploads/2019/10/3-20.png" alt="3.- Installing PHPMyAdmin using Docker compose" class="wp-image-15135" srcset="https://www.osradar.com/wp-content/uploads/2019/10/3-20.png 858w, https://www.osradar.com/wp-content/uploads/2019/10/3-20-300x177.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/3-20-768x452.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/3-20-696x410.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/3-20-714x420.png 714w" sizes="(max-width: 858px) 100vw, 858px" /><figcaption>3.- Installing PHPMyAdmin using Docker compose</figcaption></figure>



<p>Then, we will be able to access from our browser using the IP address of the server or the domain name with port 8080 that we specify. Then, log in with your credentials:</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="502" src="https://www.osradar.com/wp-content/uploads/2019/10/4-17-1024x502.png" alt="4.- PHPMyAdmin using Docker Compose" class="wp-image-15137" srcset="https://www.osradar.com/wp-content/uploads/2019/10/4-17-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2019/10/4-17-858x420.png 858w, https://www.osradar.com/wp-content/uploads/2019/10/4-17.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>4.- PHPMyAdmin using Docker Compose</figcaption></figure>



<p>Finally you will see the main screen.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="506" src="https://www.osradar.com/wp-content/uploads/2019/10/5-13-1024x506.png" alt="5.- PHPMyAdmin Running" class="wp-image-15139" srcset="https://www.osradar.com/wp-content/uploads/2019/10/5-13-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2019/10/5-13-850x420.png 850w, https://www.osradar.com/wp-content/uploads/2019/10/5-13.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>5.- PHPMyAdmin Running</figcaption></figure>



<p>So, that is it.</p>



<h2>Conclusion</h2>



<p>In a production server, we look very much for the productivity and compatibility of the applications. In this sense, using Docker images guarantees compatibility and ease of use. Today, you have learned how to install PHPMyAdmin using this technology and we will be able to realize how simple it is.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-phpmyadmin-using-docker-compose/">Deploy PHPMyAdmin using Docker Compose</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/deploy-phpmyadmin-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>Nextcloud using Docker compose</title>
		<link>https://www.osradar.com/nextcloud-docker-compose/</link>
					<comments>https://www.osradar.com/nextcloud-docker-compose/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 25 Oct 2019 23:38:18 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14879</guid>

					<description><![CDATA[<p>Nextcloud we have talked a lot about because we really like its main utility. And is that having the possibility of deploying a private cloud for us or a business environment is something very interesting. With all the advantages that it supposes since the privacy is something that we should not take to the lightly. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/nextcloud-docker-compose/">Nextcloud using Docker compose</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p><a rel="noreferrer noopener" aria-label="Nextcloud (opens in a new tab)" href="https://www.osradar.com/tag/nextcloud/" target="_blank">Nextcloud</a> we have talked a lot about because we really like its main utility. And is that having the possibility of deploying a private cloud for us or a business environment is something very interesting. With all the advantages that it supposes since the privacy is something that we should not take to the lightly. So, today we will show you how to install Nextcloud using <a rel="noreferrer noopener" aria-label="Docker (opens in a new tab)" href="https://www.osradar.com/tag/docker/" target="_blank">Docker</a> Compose. Which makes this tutorial available for many Linux distributions.</p>



<h2>Install Docker and Docker Compose on Linux</h2>



<p>The first step is to have Docker installed in the system, obviously. </p>



<ul><li>If you are using Ubuntu: <a rel="noreferrer noopener" aria-label="How to install Docker on Ubuntu 18.04? (opens in a new tab)" href="https://www.osradar.com/how-to-install-docker-on-ubuntu-18-04/" target="_blank">How to install Docker on Ubuntu 18.04?</a></li><li>For CentOS 8: <a rel="noreferrer noopener" aria-label="How to install Docker on CentOS 8? (opens in a new tab)" href="https://www.osradar.com/install-docker-centos-8/" target="_blank">How to install Docker on CentOS 8?</a></li><li>For CentOS 7: <a rel="noreferrer noopener" aria-label="How to install Docker CE on CentOS 7? (opens in a new tab)" href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" target="_blank">How to install Docker CE on CentOS 7?</a></li><li>If you use Windows: <a rel="noreferrer noopener" aria-label="How to install Docker in Windows 10? (opens in a new tab)" href="https://www.osradar.com/how-to-install-docker-in-windows-10/" target="_blank">How to install Docker in Windows 10?</a></li><li>Or, if you are using Debian 10: <a rel="noreferrer noopener" aria-label="How to install Docker on Debian 10? (opens in a new tab)" href="https://www.osradar.com/install-docker-on-debian-10/" target="_blank">How to install Docker on Debian 10?</a></li></ul>



<p>And using your distribution&#8217;s package manager, you can install Docker Compose. For example:</p>



<pre class="wp-block-preformatted">:~$ sudo apt docker-compose</pre>



<p>For Debian, Ubuntu and derivatives.</p>



<pre class="wp-block-preformatted">:~$ sudo yum install docker-compose</pre>



<p>Or, for RHEL, CentOS and derivatives.</p>



<h2>Install Nextcloud using Docker compose</h2>



<p>Now that we have our environment ready, let us create a folder <g class="gr_ gr_4 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" id="4" data-gr-id="4">called </g><code>nextcloud</code><g class="gr_ gr_4 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Style multiReplace" id="4" data-gr-id="4"> and</g> navigate there to then create <g class="gr_ gr_5 gr-alert gr_gramm gr_inline_cards gr_run_anim Style multiReplace" id="5" data-gr-id="5">the </g><code>docker-compose.yml</code><g class="gr_ gr_5 gr-alert gr_gramm gr_inline_cards gr_disable_anim_appear Style multiReplace" id="5" data-gr-id="5"> file</g>.</p>



<pre class="wp-block-preformatted">:~$ mkdir nextcloud &amp;&amp; cd nextcloud</pre>



<p>Now we will create the file with the following content.</p>



<pre class="wp-block-preformatted">:~$ nano docker-compose.yml</pre>



<pre class="wp-block-preformatted">version: '2'
 volumes:
   nextcloud:
   db:
   data:
 services:
   db:
     image: mariadb
     command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
     restart: always
     volumes:
       - db:/var/lib/mysql
     environment:
       - MYSQL_ROOT_PASSWORD=1234osradar
       - MYSQL_PASSWORD=1234osradar
       - MYSQL_DATABASE=nextclouddb
       - MYSQL_USER=nextclouduser
 app:
     image: nextcloud
     ports:
       - 1234:80
     links:
       - db
     volumes:
       - nextcloud:/var/www/html
       - data:/var/www/html/data
     restart: always</pre>



<figure class="wp-block-image"><img loading="lazy" width="875" height="626" src="https://www.osradar.com/wp-content/uploads/2019/10/1-16.png" alt="1.- Docke compose file" class="wp-image-14881" srcset="https://www.osradar.com/wp-content/uploads/2019/10/1-16.png 875w, https://www.osradar.com/wp-content/uploads/2019/10/1-16-300x215.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/1-16-768x549.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/1-16-696x498.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/1-16-587x420.png 587w" sizes="(max-width: 875px) 100vw, 875px" /><figcaption>1.- Docke compose file</figcaption></figure>



<p>Let us remember that this image of Nextcloud is the official one so many of these parameters are unalterable. Although we can always add new configurations.</p>



<p>The explanation can be quite brief because of the explicit variables. In the image of MariaDB, we take the volume <code>db</code> that will be in <code>/var/lib/mysql</code> to preserve the data that Nextcloud stores. On the other hand, in the environment section, there are the parameters of the database, user and password. You can modify this as I did.</p>



<p>In the nextcloud image, we simply redirect the application port through ours. I have chosen as an example the 1234 but you know that you can modify it. And I have added two volumes one for the application as such and another for the data. Remember to create these folders in case you don&#8217;t have them already created.</p>



<p>Not much more than explaining the truth.</p>



<p>Once everything is in place, we save the file and close them. Then we run it:</p>



<pre class="wp-block-preformatted">:~$ docker-compose up -d</pre>



<figure class="wp-block-image"><img loading="lazy" width="965" height="718" src="https://www.osradar.com/wp-content/uploads/2019/10/2-15.png" alt="2.- Installing Nextcloud using docker compose" class="wp-image-14882" srcset="https://www.osradar.com/wp-content/uploads/2019/10/2-15.png 965w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-300x223.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-768x571.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-80x60.png 80w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-265x198.png 265w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-485x360.png 485w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-696x518.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/2-15-564x420.png 564w" sizes="(max-width: 965px) 100vw, 965px" /><figcaption>2.- Installing Nextcloud using docker compose</figcaption></figure>



<p>At this point you can open the browser and go to <code>http://your-server:1234</code> but we will make a virtual host in Apache to avoid having to use the port. In other words an inverse proxy with Apache.</p>



<p>To do this, enable the following Apache module:</p>



<pre class="wp-block-preformatted">:~$ sudo a2enmod proxy_http
:~$ sudo systemctl restart apache2</pre>



<p>Then, create the new virtualhost for Nextcloud:</p>



<pre class="wp-block-preformatted">:~$ sudo nano /etc/apache2/sites-available/nextcloud.conf</pre>



<p>And add the following:</p>



<pre class="wp-block-preformatted">&lt;Virtualhost *:80>
     ServerName nextcloud.osradar.test
     &lt;Directory /var/www/html/>
       Options FollowSymlinks
       AllowOverride All
       Require all granted
     &lt;/Directory>
     ErrorLog ${APACHE_LOG_DIR}/nextcloud.osradar.test_error.log
     CustomLog ${APACHE_LOG_DIR}/nextcloud.osradar.test_access.log combined
     &lt;Location "/">
         ProxyPass "http://localhost:1234/"
         ProxyPassReverse "http://localhost:1234/" 
     &lt;/Location>
&lt;/Virtualhost></pre>



<figure class="wp-block-image"><img loading="lazy" width="897" height="376" src="https://www.osradar.com/wp-content/uploads/2019/10/3-14.png" alt="3.- Creating a new virtual host for Nextcloud" class="wp-image-14884" srcset="https://www.osradar.com/wp-content/uploads/2019/10/3-14.png 897w, https://www.osradar.com/wp-content/uploads/2019/10/3-14-300x126.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/3-14-768x322.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/3-14-696x292.png 696w" sizes="(max-width: 897px) 100vw, 897px" /><figcaption>3.- Creating a new virtual host for Nextcloud</figcaption></figure>



<p>Then, save the changes and close the file.</p>



<p>So, enable the new Virtual host.</p>



<pre class="wp-block-preformatted">:~$ sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
:~$ sudo a2enmod rewrite
:~$ sudo systemctl restart apache2</pre>



<h2>Complete the installation</h2>



<p>Now, open your web browser and you will see the main page. Just type your database credentials and complete the installation.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="505" src="https://www.osradar.com/wp-content/uploads/2019/10/4-12-1024x505.png" alt="4.- Nextcloud main page" class="wp-image-14886" srcset="https://www.osradar.com/wp-content/uploads/2019/10/4-12-1024x505.png 1024w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-696x343.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-1068x527.png 1068w, https://www.osradar.com/wp-content/uploads/2019/10/4-12-851x420.png 851w, https://www.osradar.com/wp-content/uploads/2019/10/4-12.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>4.- Nextcloud main page</figcaption></figure>



<p>In this step, I want to stop for a while. On the host, we do not type <code>localhost</code> but we refer to db which is where MariaDB is &#8220;installed&#8221;. So, the port is 3306 because it is the default and in the <code>docker-compose.yml</code> file we do not specify another one.</p>



<p>Then the installation will begin and you will see the dashboard.</p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="503" src="https://www.osradar.com/wp-content/uploads/2019/10/5-11-1024x503.png" alt="5.- Nextcloud using Docker compose" class="wp-image-14888" srcset="https://www.osradar.com/wp-content/uploads/2019/10/5-11-1024x503.png 1024w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-768x377.png 768w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-533x261.png 533w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-696x342.png 696w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-1068x525.png 1068w, https://www.osradar.com/wp-content/uploads/2019/10/5-11-855x420.png 855w, https://www.osradar.com/wp-content/uploads/2019/10/5-11.png 1360w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>5.- Nextcloud using Docker compose</figcaption></figure>



<p>And that is it. You can read more about <a rel="noreferrer noopener" aria-label="Docker (opens in a new tab)" href="https://www.docker.com/" target="_blank">Docker</a> on the project website. Or about <a rel="noreferrer noopener" aria-label="docker compose (opens in a new tab)" href="https://docs.docker.com/compose/" target="_blank">docker compose</a>.</p>



<h2>Conclusion</h2>



<p>Docker we already know how powerful he is and today we have seen a bit of what can be done. In a few minutes, we can have in our server a Nextcloud instance working without any problem. So let&#8217;s make the most of it.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/nextcloud-docker-compose/">Nextcloud using Docker compose</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/nextcloud-docker-compose/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Centos7 and 8 uses docker-compose to install zabbix</title>
		<link>https://www.osradar.com/centos7-uses-docker-compose-to-install-zabbix/</link>
					<comments>https://www.osradar.com/centos7-uses-docker-compose-to-install-zabbix/#comments</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Mon, 30 Sep 2019 16:22:19 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[linux. mysql]]></category>
		<category><![CDATA[monitoring tools]]></category>
		<category><![CDATA[zabbix]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=14072</guid>

					<description><![CDATA[<p>Build and run a zabbix system through docker&#8217;s basic operation command, which involves zabbix-server, zabbix-web-Nginx-mysq, and mysql container. Operation up relatively tedious, and every time to run to come again is very inconvenient. Here&#8217;s how to deploy zabbix with a docker-compose Install Docker and Docker-compose The first thing to do is to install Docker and [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/centos7-uses-docker-compose-to-install-zabbix/">Centos7 and 8 uses docker-compose to install zabbix</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Build and run a <a href="https://www.osradar.com/install-zabbix-server-centos-8-rhel-oracle-linux/">zabbix</a> system through docker&#8217;s basic operation command, which involves zabbix-server, zabbix-web-Nginx-mysq, and mysql container. Operation up relatively tedious, and every time to run to come again is very inconvenient. Here&#8217;s how to deploy zabbix with a docker-compose </p>



<p></p>



<h4><strong>Install Docker and Docker-compose </strong></h4>



<p>The first thing to do is to install Docker and Docker compose in our system. For centos7, use the following command.</p>



<p>For the rest of the releases, it&#8217;s best to read the official Docker documentation.</p>



<pre class="wp-block-preformatted">[root@localhost ~]# yum install docker python-pip docker-compose -y</pre>



<p>Check that the installation is successful</p>



<pre class="wp-block-preformatted"> [root@localhost ~]# docker-compose -v &amp;&amp; docker -v</pre>



<figure class="wp-block-image"><img loading="lazy" width="1000" height="152" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/09/check-docker.png" alt="Check docker and docker-compose" class="wp-image-14076" srcset="https://www.osradar.com/wp-content/uploads/2019/09/check-docker.png 1000w, https://www.osradar.com/wp-content/uploads/2019/09/check-docker-300x46.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/check-docker-768x117.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/check-docker-696x106.png 696w" sizes="(max-width: 1000px) 100vw, 1000px" /><figcaption> Check docker and docker-compose</figcaption></figure>



<h4><strong>Deploy zabbix using Docker-compose</strong></h4>



<ul><li>First, create a folder and then create docker-compose.yml files in it</li></ul>



<pre class="wp-block-preformatted">[root@localhost ~]# mkdir zabbix
[root@localhost ~]# cd zabbix/
[root@localhost zabbix]# touch docker-compose.yml</pre>



<ul><li>Edit docker-compose.yml  file</li></ul>



<pre class="wp-block-preformatted">[root@localhost zabbix]# vim docker-compose.yml 
 version: '3'
 services:
   zabbix-mysql:
     image: mysql:5.6
     container_name: zabbix-mysql
     ports:
       - '3306:3306'
     environment:
       MYSQL_ROOT_PASSWORD: zabbix
     volumes:
       - /root/zabbix/mysql-data:/var/lib/mysql
 zabbix-server:
     image: zabbix/zabbix-server-mysql:ubuntu-3.0.4
     container_name: zabbix-server
     environment:
       DB_SERVER_HOST: "zabbix-mysql"
       MYSQL_USER: root
       MYSQL_PASSWORD: zabbix
     ports:
       - '10051:10051'
     links:
       - zabbix-mysql
     depends_on:
       - zabbix-mysql
 zabbix-web:
     image: zabbix/zabbix-web-nginx-mysql:ubuntu-3.0.4
     container_name: zabbix-web
     environment:
       DB_SERVER_HOST: zabbix-mysql
       MYSQL_USER: root
       MYSQL_PASSWORD: zabbix
       ZBX_SERVER_HOST: "zabbix-server"
       PHP_TZ: Asia/Shanghai
     ports:
       - '80:80'
       - '443:443'
     links:
       - zabbix-mysql
       - zabbix-server
     depends_on:
       - zabbix-mysql
       - zabbix-server</pre>



<h4><strong>Important environment variable Settings</strong></h4>



<ul><li>Zabbix-web-nginx-mysql and zabbix-web-nginx-mysql image versions remain consistent (ubuntu-3.0.4 or other)</li><li>MYSQL_ROOT_PASSWORD:  mysql root password </li><li>MYSQL_USER: Connect the mysql user</li><li>MYSQL_PASSWORD: Connect the mysql  password</li></ul>



<h4><strong>Running and testing zabbix</strong></h4>



<pre class="wp-block-preformatted">[root@localhost ~]# docker-compose up -d
[root@localhost ~]# docker-compose ps</pre>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="507" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/09/run-1024x507.png" alt="Deploy zabbix using docker-compose" class="wp-image-14083" srcset="https://www.osradar.com/wp-content/uploads/2019/09/run-1024x507.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/run-300x149.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/run-768x380.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/run-324x160.png 324w, https://www.osradar.com/wp-content/uploads/2019/09/run-696x345.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/run-1068x529.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/run-848x420.png 848w, https://www.osradar.com/wp-content/uploads/2019/09/run.png 1510w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption> <em>Deploy zabbix using docker-compose</em> </figcaption></figure>



<p>Wait 2 minutes for the database initialization to complete </p>



<p>Next, open your web browser and go to your server using the port 80. </p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="353" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/09/zabbixlogin-1024x353.png" alt="zabbix login" class="wp-image-14084" srcset="https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-1024x353.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-300x103.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-768x265.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-696x240.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-1068x368.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin-1218x420.png 1218w, https://www.osradar.com/wp-content/uploads/2019/09/zabbixlogin.png 1728w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>zabbix login</figcaption></figure>



<p>Log in using Zabbix&#8217;s default user and password <br>user: Admin  password:zabbix  <br>After that, you will see the dashboard  </p>



<figure class="wp-block-image"><img loading="lazy" width="1024" height="439" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/09/login-1024x439.png" alt="zabbix  dashboard " class="wp-image-14085" srcset="https://www.osradar.com/wp-content/uploads/2019/09/login-1024x439.png 1024w, https://www.osradar.com/wp-content/uploads/2019/09/login-300x129.png 300w, https://www.osradar.com/wp-content/uploads/2019/09/login-768x329.png 768w, https://www.osradar.com/wp-content/uploads/2019/09/login-696x298.png 696w, https://www.osradar.com/wp-content/uploads/2019/09/login-1068x458.png 1068w, https://www.osradar.com/wp-content/uploads/2019/09/login-980x420.png 980w, https://www.osradar.com/wp-content/uploads/2019/09/login.png 1862w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>zabbix  dashboard </figcaption></figure>



<p> In a nutshell with Docker Compose, you no longer need to use shell scripts to start the container. In the configuration file, all containers are defined through the services, and then the application is started, stopped, and restarted using the docker-compose script, along with the services in the application and all containers that depend on the services. Docker Compose is a tool for defining and running multi-container Docker applications. it USES YAML files to configure the service of the application and a single command to perform the creation and startup of all containers. The <a href="https://docs.docker.com/compose/reference/create/">docker-compose</a> cli tool allows users to run commands for multiple containers simultaneously. </p>


<p class="wp-block-tag-cloud"><a href="https://www.osradar.com/tag/android/" class="tag-cloud-link tag-link-62 tag-link-position-1" style="font-size: 16.87323943662pt;" aria-label="android (260 items)">android<span class="tag-link-count"> (260)</span></a>
<a href="https://www.osradar.com/tag/apache/" class="tag-cloud-link tag-link-127 tag-link-position-2" style="font-size: 10.366197183099pt;" aria-label="Apache (56 items)">Apache<span class="tag-link-count"> (56)</span></a>
<a href="https://www.osradar.com/tag/bionic/" class="tag-cloud-link tag-link-1101 tag-link-position-3" style="font-size: 10.267605633803pt;" aria-label="bionic (55 items)">bionic<span class="tag-link-count"> (55)</span></a>
<a href="https://www.osradar.com/tag/buster/" class="tag-cloud-link tag-link-1945 tag-link-position-4" style="font-size: 11.943661971831pt;" aria-label="Buster (83 items)">Buster<span class="tag-link-count"> (83)</span></a>
<a href="https://www.osradar.com/tag/centos/" class="tag-cloud-link tag-link-72 tag-link-position-5" style="font-size: 14.30985915493pt;" aria-label="CentOS (145 items)">CentOS<span class="tag-link-count"> (145)</span></a>
<a href="https://www.osradar.com/tag/centos-8/" class="tag-cloud-link tag-link-1987 tag-link-position-6" style="font-size: 9.9718309859155pt;" aria-label="Centos 8 (51 items)">Centos 8<span class="tag-link-count"> (51)</span></a>
<a href="https://www.osradar.com/tag/database/" class="tag-cloud-link tag-link-785 tag-link-position-7" style="font-size: 10.366197183099pt;" aria-label="database (57 items)">database<span class="tag-link-count"> (57)</span></a>
<a href="https://www.osradar.com/tag/databases/" class="tag-cloud-link tag-link-1492 tag-link-position-8" style="font-size: 10.760563380282pt;" aria-label="Databases (62 items)">Databases<span class="tag-link-count"> (62)</span></a>
<a href="https://www.osradar.com/tag/debian/" class="tag-cloud-link tag-link-404 tag-link-position-9" style="font-size: 15.098591549296pt;" aria-label="debian (171 items)">debian<span class="tag-link-count"> (171)</span></a>
<a href="https://www.osradar.com/tag/desktop/" class="tag-cloud-link tag-link-1984 tag-link-position-10" style="font-size: 8.1971830985915pt;" aria-label="desktop (34 items)">desktop<span class="tag-link-count"> (34)</span></a>
<a href="https://www.osradar.com/tag/fedora/" class="tag-cloud-link tag-link-246 tag-link-position-11" style="font-size: 9.8732394366197pt;" aria-label="fedora (50 items)">fedora<span class="tag-link-count"> (50)</span></a>
<a href="https://www.osradar.com/tag/focal/" class="tag-cloud-link tag-link-2874 tag-link-position-12" style="font-size: 12.830985915493pt;" aria-label="focal (102 items)">focal<span class="tag-link-count"> (102)</span></a>
<a href="https://www.osradar.com/tag/focal-fossa/" class="tag-cloud-link tag-link-2873 tag-link-position-13" style="font-size: 13.028169014085pt;" aria-label="Focal Fossa (106 items)">Focal Fossa<span class="tag-link-count"> (106)</span></a>
<a href="https://www.osradar.com/tag/google/" class="tag-cloud-link tag-link-225 tag-link-position-14" style="font-size: 15pt;" aria-label="google (168 items)">google<span class="tag-link-count"> (168)</span></a>
<a href="https://www.osradar.com/tag/howto/" class="tag-cloud-link tag-link-792 tag-link-position-15" style="font-size: 18.056338028169pt;" aria-label="howto (346 items)">howto<span class="tag-link-count"> (346)</span></a>
<a href="https://www.osradar.com/tag/how-to/" class="tag-cloud-link tag-link-84 tag-link-position-16" style="font-size: 17.859154929577pt;" aria-label="How to (330 items)">How to<span class="tag-link-count"> (330)</span></a>
<a href="https://www.osradar.com/tag/how-to-tutorials/" class="tag-cloud-link tag-link-3150 tag-link-position-17" style="font-size: 8.7887323943662pt;" aria-label="how to tutorials (39 items)">how to tutorials<span class="tag-link-count"> (39)</span></a>
<a href="https://www.osradar.com/tag/java/" class="tag-cloud-link tag-link-134 tag-link-position-18" style="font-size: 9.8732394366197pt;" aria-label="java (50 items)">java<span class="tag-link-count"> (50)</span></a>
<a href="https://www.osradar.com/tag/linux/" class="tag-cloud-link tag-link-210 tag-link-position-19" style="font-size: 22pt;" aria-label="Linux (864 items)">Linux<span class="tag-link-count"> (864)</span></a>
<a href="https://www.osradar.com/tag/linux-mint/" class="tag-cloud-link tag-link-443 tag-link-position-20" style="font-size: 8.5915492957746pt;" aria-label="linux mint (37 items)">linux mint<span class="tag-link-count"> (37)</span></a>
<a href="https://www.osradar.com/tag/mariadb/" class="tag-cloud-link tag-link-951 tag-link-position-21" style="font-size: 9.6760563380282pt;" aria-label="mariadb (48 items)">mariadb<span class="tag-link-count"> (48)</span></a>
<a href="https://www.osradar.com/tag/monitoring/" class="tag-cloud-link tag-link-801 tag-link-position-22" style="font-size: 8.4929577464789pt;" aria-label="monitoring (36 items)">monitoring<span class="tag-link-count"> (36)</span></a>
<a href="https://www.osradar.com/tag/mysql/" class="tag-cloud-link tag-link-1235 tag-link-position-23" style="font-size: 9.1830985915493pt;" aria-label="mysql (43 items)">mysql<span class="tag-link-count"> (43)</span></a>
<a href="https://www.osradar.com/tag/network/" class="tag-cloud-link tag-link-1102 tag-link-position-24" style="font-size: 8.3943661971831pt;" aria-label="network (35 items)">network<span class="tag-link-count"> (35)</span></a>
<a href="https://www.osradar.com/tag/news/" class="tag-cloud-link tag-link-1341 tag-link-position-25" style="font-size: 10.56338028169pt;" aria-label="News (59 items)">News<span class="tag-link-count"> (59)</span></a>
<a href="https://www.osradar.com/tag/new-version/" class="tag-cloud-link tag-link-1428 tag-link-position-26" style="font-size: 10.859154929577pt;" aria-label="New version (64 items)">New version<span class="tag-link-count"> (64)</span></a>
<a href="https://www.osradar.com/tag/opensuse/" class="tag-cloud-link tag-link-561 tag-link-position-27" style="font-size: 9.2816901408451pt;" aria-label="opensuse (44 items)">opensuse<span class="tag-link-count"> (44)</span></a>
<a href="https://www.osradar.com/tag/php/" class="tag-cloud-link tag-link-135 tag-link-position-28" style="font-size: 11.056338028169pt;" aria-label="PHP (66 items)">PHP<span class="tag-link-count"> (66)</span></a>
<a href="https://www.osradar.com/tag/programming/" class="tag-cloud-link tag-link-776 tag-link-position-29" style="font-size: 14.211267605634pt;" aria-label="Programming (139 items)">Programming<span class="tag-link-count"> (139)</span></a>
<a href="https://www.osradar.com/tag/rhel/" class="tag-cloud-link tag-link-69 tag-link-position-30" style="font-size: 9.5774647887324pt;" aria-label="RHEL (47 items)">RHEL<span class="tag-link-count"> (47)</span></a>
<a href="https://www.osradar.com/tag/security/" class="tag-cloud-link tag-link-137 tag-link-position-31" style="font-size: 12.929577464789pt;" aria-label="Security (103 items)">Security<span class="tag-link-count"> (103)</span></a>
<a href="https://www.osradar.com/tag/server/" class="tag-cloud-link tag-link-848 tag-link-position-32" style="font-size: 16.774647887324pt;" aria-label="server (259 items)">server<span class="tag-link-count"> (259)</span></a>
<a href="https://www.osradar.com/tag/sql/" class="tag-cloud-link tag-link-1441 tag-link-position-33" style="font-size: 10.957746478873pt;" aria-label="SQL (65 items)">SQL<span class="tag-link-count"> (65)</span></a>
<a href="https://www.osradar.com/tag/tools/" class="tag-cloud-link tag-link-800 tag-link-position-34" style="font-size: 9.9718309859155pt;" aria-label="tools (52 items)">tools<span class="tag-link-count"> (52)</span></a>
<a href="https://www.osradar.com/tag/tutorial/" class="tag-cloud-link tag-link-86 tag-link-position-35" style="font-size: 19.535211267606pt;" aria-label="Tutorial (485 items)">Tutorial<span class="tag-link-count"> (485)</span></a>
<a href="https://www.osradar.com/tag/ubuntu/" class="tag-cloud-link tag-link-71 tag-link-position-36" style="font-size: 17.169014084507pt;" aria-label="ubuntu (282 items)">ubuntu<span class="tag-link-count"> (282)</span></a>
<a href="https://www.osradar.com/tag/unix/" class="tag-cloud-link tag-link-1170 tag-link-position-37" style="font-size: 8pt;" aria-label="unix (32 items)">unix<span class="tag-link-count"> (32)</span></a>
<a href="https://www.osradar.com/tag/web/" class="tag-cloud-link tag-link-132 tag-link-position-38" style="font-size: 8.887323943662pt;" aria-label="web (40 items)">web<span class="tag-link-count"> (40)</span></a>
<a href="https://www.osradar.com/tag/web-server/" class="tag-cloud-link tag-link-1253 tag-link-position-39" style="font-size: 8.0985915492958pt;" aria-label="web server (33 items)">web server<span class="tag-link-count"> (33)</span></a>
<a href="https://www.osradar.com/tag/windows/" class="tag-cloud-link tag-link-98 tag-link-position-40" style="font-size: 17.661971830986pt;" aria-label="Windows (315 items)">Windows<span class="tag-link-count"> (315)</span></a>
<a href="https://www.osradar.com/tag/windows-10/" class="tag-cloud-link tag-link-83 tag-link-position-41" style="font-size: 16.183098591549pt;" aria-label="Windows 10 (222 items)">Windows 10<span class="tag-link-count"> (222)</span></a>
<a href="https://www.osradar.com/tag/windows-11/" class="tag-cloud-link tag-link-4007 tag-link-position-42" style="font-size: 11.450704225352pt;" aria-label="windows 11 (73 items)">windows 11<span class="tag-link-count"> (73)</span></a>
<a href="https://www.osradar.com/tag/windows-server/" class="tag-cloud-link tag-link-65 tag-link-position-43" style="font-size: 9.4788732394366pt;" aria-label="Windows server (46 items)">Windows server<span class="tag-link-count"> (46)</span></a>
<a href="https://www.osradar.com/tag/windows-server-2019/" class="tag-cloud-link tag-link-2144 tag-link-position-44" style="font-size: 10.464788732394pt;" aria-label="Windows server 2019 (58 items)">Windows server 2019<span class="tag-link-count"> (58)</span></a>
<a href="https://www.osradar.com/tag/xiaomi/" class="tag-cloud-link tag-link-3291 tag-link-position-45" style="font-size: 8.4929577464789pt;" aria-label="Xiaomi (36 items)">Xiaomi<span class="tag-link-count"> (36)</span></a></p><p>The post <a rel="nofollow" href="https://www.osradar.com/centos7-uses-docker-compose-to-install-zabbix/">Centos7 and 8 uses docker-compose to install zabbix</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/centos7-uses-docker-compose-to-install-zabbix/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to deploy Jenkins using docker-compose?</title>
		<link>https://www.osradar.com/deploy-jenkins-using-docker-compose/</link>
					<comments>https://www.osradar.com/deploy-jenkins-using-docker-compose/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 30 Jul 2019 02:12:57 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[Devops]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Virtualization]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12838</guid>

					<description><![CDATA[<p>We already know the potential of Docker and how easy it is to display images thanks to Docker-compose. In this post, you will learn how to deploy Jenkins using Docker-compose. This is in order to avoid manual installation of the application. Moreover, with this method, you do not have to worry about the operating system [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-jenkins-using-docker-compose/">How to deploy Jenkins using docker-compose?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We already know the potential of Docker and how easy it is to display images thanks to Docker-compose. In this post, you will learn how to deploy Jenkins using Docker-compose. This is in order to avoid manual installation of the application. Moreover, with this method, you do not have to worry about the operating system but just have Docker installed.</p>
<h2>Install Docker and Docker-compose</h2>
<p>The first thing to do is to install Docker and Docker compose in our system. <a href="https://www.osradar.com/install-docker-on-debian-10/">In the case of Debian 10</a>, there is a tutorial of ours that you can use as a guide.</p>
<p>For the rest of the distributions, it is a good idea to read <a href="https://docs.docker.com/install/">Docker&#8217;s official documentation</a>. Anyway, it is not hard to do.</p>
<h2>Deploy Jenkins using Docker-compose</h2>
<p>As we explained in the post to deploy LAMP using Docker-compose, the definitions of images and their options, we do them in a file with the extension YML. To do this, it is recommended to first make a folder and within it create the file.</p>
<p>So, open a terminal session and type the following:</p>
<pre>:~$ mkdir jenkins &amp;&amp; cd jenkins</pre>
<p>Once we have entered the folder using your favorite text editor proceed to create the <code>docker-compose.yml</code> file.</p>
<pre>:~$ nano docker-compose.yml</pre>
<p>Once inside, we will begin to define the content.</p>
<pre>version: '2'
services:
  jenkins:
  image: 'bitnami/jenkins:2'</pre>
<p>First the basic file definitions. The version to use will be the 2. And we will deploy only a service that will be called <em>jenkins</em>. For it, we will use the image Jenkins of bitnami. It is very well documented and quite reliable.</p>
<p>Then, we continue with the definition of the options.</p>
<pre>ports:
      - '80:8080'
      - '443:8443'
      - '50000:50000'
    volumes:
      - 'jenkins_data:/bitnami'
volumes:
  jenkins_data:
  driver: local</pre>
<p>In this section, you define the ports that the image will use. Remember that Jenkins uses the <code>8080</code> but we will access the <code>8080</code> port of the image through the <code>80</code>. So, the <code>443</code> is for secure connections with Jenkins.</p>
<p>Equally, with LAMP, it is advisable to mount a volume for the Jenkins data. And at the end of the file, we refer to the options of that volume.</p>
<p>So, the file will be completed as follows:</p>
<pre>version: '2'
services:
  jenkins:
    image: 'bitnami/jenkins:2'
    ports:
      - '80:8080'
      - '443:8443'
      - '50000:50000'
    volumes:
      - 'jenkins_data:/bitnami'
volumes:
  jenkins_data:
  driver: local</pre>
<p><figure id="attachment_12841" aria-describedby="caption-attachment-12841" style="width: 841px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12841" src="https://www.osradar.com/wp-content/uploads/2019/07/1-9.jpeg" alt="1.- Docker-compose file for Jenkins" width="841" height="301" srcset="https://www.osradar.com/wp-content/uploads/2019/07/1-9.jpeg 841w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-300x107.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-768x275.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/1-9-696x249.jpeg 696w" sizes="(max-width: 841px) 100vw, 841px" /><figcaption id="caption-attachment-12841" class="wp-caption-text">1.- Docker-compose file for Jenkins</figcaption></figure></p>
<p>We can now raise the image, but I want to show you a few more options.</p>
<h2>Some useful options to deploy Jenkins</h2>
<p>This Jenkins image is customizable thanks to environment variables that can be modified. Some of them are these:</p>
<ul>
<li>JENKINS_USERNAME: Jenkins admin username.</li>
<li>JENKINS_PASSWORD: Jenkins admin password.</li>
<li>JENKINS_HOME: Jenkins home directory.</li>
<li>DISABLE_JENKINS_INITIALIZATION: Allows to disable the initial Bitnami configuration for Jenkins.</li>
<li>JAVA_OPTS: Customize JVM parameters.</li>
</ul>
<p>To use and modify them, just add them to the file in the environment section. For example:</p>
<pre>jenkins:
  ...
  environment:
    - JENKINS_PASSWORD=your-password
  ...</pre>
<p>Note: by default the user is <code>user</code> and the password is <code>bitnami</code>. Then, you can modify it from Jenkins once it has been deployed.</p>
<h2>Running and testing Jenkins</h2>
<p>Once you have finished defining the docker-compose file. Now we can execute it with the following command:</p>
<pre>:~$ sudo docker-compose up -d</pre>
<p><figure id="attachment_12843" aria-describedby="caption-attachment-12843" style="width: 782px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12843" src="https://www.osradar.com/wp-content/uploads/2019/07/2-6.jpeg" alt="2.- Deploy Jenkins using docker-compose" width="782" height="331" srcset="https://www.osradar.com/wp-content/uploads/2019/07/2-6.jpeg 782w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-300x127.jpeg 300w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-768x325.jpeg 768w, https://www.osradar.com/wp-content/uploads/2019/07/2-6-696x295.jpeg 696w" sizes="(max-width: 782px) 100vw, 782px" /><figcaption id="caption-attachment-12843" class="wp-caption-text">2.- Deploy Jenkins using docker-compose</figcaption></figure></p>
<p>Next, open your web browser and go to your server using the port 80.</p>
<p><figure id="attachment_12844" aria-describedby="caption-attachment-12844" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12844" src="https://www.osradar.com/wp-content/uploads/2019/07/3-11.png" alt="3.- Jenkins is almost ready to work" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/3-11.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/3-11-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12844" class="wp-caption-text">3.- Jenkins is almost ready to work</figcaption></figure></p>
<p>Then, login into the application using the default credentials or yours.</p>
<p><figure id="attachment_12845" aria-describedby="caption-attachment-12845" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12845" src="https://www.osradar.com/wp-content/uploads/2019/07/4-8.png" alt="4.- Jenkins log in screen" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/4-8.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/4-8-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12845" class="wp-caption-text">4.- Jenkins log in screen</figcaption></figure></p>
<p>After that, you will see the dashboard.</p>
<p><figure id="attachment_12846" aria-describedby="caption-attachment-12846" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="wp-image-12846 size-full" src="https://www.osradar.com/wp-content/uploads/2019/07/5-9.png" alt="5.- Everything is OK" width="1366" height="664" srcset="https://www.osradar.com/wp-content/uploads/2019/07/5-9.png 1366w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-300x146.png 300w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-768x373.png 768w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-1024x498.png 1024w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-696x338.png 696w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-1068x519.png 1068w, https://www.osradar.com/wp-content/uploads/2019/07/5-9-864x420.png 864w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-12846" class="wp-caption-text">5.- Everything is OK</figcaption></figure></p>
<p>And that is it.</p>
<h2>Conclusion</h2>
<p>Jenkins is a very popular application and it is possible to install it on our server using docker. This way we save a lot of time on some operating-system configurations. However, for total control of it, it is advisable to do it manually.</p>
<p>You can read <a href="https://www.osradar.com/install-jenkins-debian-10/" target="_blank" rel="noopener noreferrer">How to install Jenkins on Debian 10</a>?</p>
<p>Please share this post and join <a href="https://t.me/osradar">our Telegram channel</a>.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/deploy-jenkins-using-docker-compose/">How to deploy Jenkins using docker-compose?</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/deploy-jenkins-using-docker-compose/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Docker Compose on CentOS 7?</title>
		<link>https://www.osradar.com/how-to-install-docker-compose-on-centos-7/</link>
					<comments>https://www.osradar.com/how-to-install-docker-compose-on-centos-7/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Thu, 14 Mar 2019 14:24:43 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[Docker compose]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=11431</guid>

					<description><![CDATA[<p>ersionDocker&#8217;s technology is one of the most widely used today. Many sysadmins use it to deploy applications quickly and easily through images. These images contain applications or services already &#8220;packaged&#8221; that can run indistinctly from the system. It is only necessary that the system has Docker installed and that&#8217;s it. However, there are tools that [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-docker-compose-on-centos-7/">How to install Docker Compose on CentOS 7?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>ersionDocker&#8217;s technology is one of the most widely used today. Many sysadmins use it to deploy applications quickly and easily through images. These images contain applications or services already &#8220;packaged&#8221; that can run indistinctly from the system. It is only necessary that the system has Docker installed and that&#8217;s it. However, there are tools that extend these features. Therefore, I will teach you how to install Docker Compose on CentOS 7.</p>
<p>As I have already explained, Docker is highly popular. If you did not know, it is an open source technology project that allows the deployment of applications through containers. These containers are distributed in the form of images that are loads from Docker. So, the programmer or Sysadmin can make an image of an application and redistribute it in many systems. In addition, all this without dependencies or compatibility problems.</p>
<h1>What is Docker Compose?</h1>
<p>Docker Compose was born as a tool that extends the functionality of Docker. Docker is for deploying or installing applications that are in the form of images. However, many applications require other images to run. For example, if you want to install WordPress, you need the images of the web server, the database handler and finally the WordPress itself. This also happens with other services, which require to operate other services.</p>
<p>With Docker Compose it is possible to define the dependencies of an image and they will be automatically managed. Too useful and practice this utility.</p>
<p>So, let us install Docker Compose on CentOS 7.</p>
<h1>Install Docker Compose on CentOS 7</h1>
<p>To use Docker Compose, you need to install Docker first. Installing Docker is quite simple and in this post, we show you how to do it.</p>
<p>Read <a href="https://www.osradar.com/how-to-install-docker-ce-on-centos-7/" rel="noopener noreferrer">how to install Docker on CentOS 7?</a></p>
<p>Once Docker is installed and fully functional, we can start installing Docker Compose.</p>
<p>For this, we will use the official Docker Compose binary. Open a terminal and as root user run the following command:</p>
<pre>:~# curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose</pre>
<p><figure id="attachment_11432" aria-describedby="caption-attachment-11432" style="width: 1365px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11432" src="https://www.osradar.com/wp-content/uploads/2019/03/1-8.png" alt="1.- Download and install Docker Compose" width="1365" height="166" srcset="https://www.osradar.com/wp-content/uploads/2019/03/1-8.png 1365w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-300x36.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-768x93.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-1024x125.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-696x85.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/1-8-1068x130.png 1068w" sizes="(max-width: 1365px) 100vw, 1365px" /><figcaption id="caption-attachment-11432" class="wp-caption-text">1.- Download and install Docker Compose</figcaption></figure></p>
<p>After that, set the execution permission to the binary.</p>
<pre>:~# chmod +x /usr/local/bin/docker-compose</pre>
<p>Next, create a sym link for Docker compose.</p>
<pre>:~# <code>ln <span class="nt">-s</span> /usr/local/bin/docker-compose /usr/bin/docker-compose</code></pre>
<p>Finally, check the installed version.</p>
<pre>:~# docker-compose --version</pre>
<p><figure id="attachment_11433" aria-describedby="caption-attachment-11433" style="width: 860px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11433" src="https://www.osradar.com/wp-content/uploads/2019/03/2-8.png" alt="2.- Docker compose" width="860" height="144" srcset="https://www.osradar.com/wp-content/uploads/2019/03/2-8.png 860w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-300x50.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-768x129.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/2-8-696x117.png 696w" sizes="(max-width: 860px) 100vw, 860px" /><figcaption id="caption-attachment-11433" class="wp-caption-text">2.- Docker compose</figcaption></figure></p>
<p>So, Docker compose is ready to use.</p>
<h1>Using Docker Compose</h1>
<p>Docker Compose automatically manages various images through a .yaml file. This file defines the parameters to be followed and the management of the images. Then, it is lifted with a command and ready.</p>
<p>In this example, I will make a file to install a LAMP server.</p>
<p>First, we need to create a file with a .yml extension called docker-compose. On it, we need to put all the image requisites. For example:</p>
<pre>version: "3"
 
services:
  test_mysql:
    image: mysql:5.7
    environment:
      - MYSQL_DATABASE=testdatabase
      - MYSQL_ROOT_PASSWORD=rootpss
      - MYSQL_USER=user
      - MYSQL_PASSWORD=userpss
    volumes:
      - ./volume/mysql:/var/lib/mysql
    expose:
      - 3306
    ports:
      - 3306:3306
   
  php:
    image: php:7-apache
    volumes:
      - ./test_web/:/var/www/html
    expose:
      - 80
    ports:
      - 80:80
    links: 
      - test_mysql</pre>
<p><figure id="attachment_11434" aria-describedby="caption-attachment-11434" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11434" src="https://www.osradar.com/wp-content/uploads/2019/03/3-7.png" alt="3.- Creating the docker-composer yml file" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/03/3-7.png 1366w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/03/3-7-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-11434" class="wp-caption-text">3.- Creating the docker-composer yml file</figcaption></figure></p>
<p>The file is somewhat long but very understandable. I will try to explain it briefly to make it clearer.</p>
<p>Version refers to the version of the Docker Compose file. It is currently 3. As it evolves, it becomes incremental. Within Service, the services to be deployed are defined. In this case, there are two, MySQL and PHP with Apache already incorporated.</p>
<p>The first service is MySQL where test_mysql is the name of the service and the image that is going to load. Then, we define an environment with test credentials. We need to create a new volume so as not to lose the data and make it available through port 3306.</p>
<p>Similarly, in the PHP service, we first assign a name. Then, the image to load, the volume where we can place our page and then the ports to use. Finally, we must link the services and therefore the last line.</p>
<p>After that, use Docker Compose to make apply the file</p>
<pre>:~# docker-compose up -d</pre>
<p><figure id="attachment_11436" aria-describedby="caption-attachment-11436" style="width: 1366px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-11436" src="https://www.osradar.com/wp-content/uploads/2019/03/4-4.png" alt="Using docker compose" width="1366" height="768" srcset="https://www.osradar.com/wp-content/uploads/2019/03/4-4.png 1366w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-300x169.png 300w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-768x432.png 768w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-1024x576.png 1024w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-696x391.png 696w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-1068x600.png 1068w, https://www.osradar.com/wp-content/uploads/2019/03/4-4-747x420.png 747w" sizes="(max-width: 1366px) 100vw, 1366px" /><figcaption id="caption-attachment-11436" class="wp-caption-text">Using docker compose</figcaption></figure></p>
<p>As you can see, there is no error in the execution of the file and at the end, you will have the services running. Remember to open the ports in the firewall for everything to work.</p>
<p>On the contrary, if you want to stop the execution of the containers, run the following command:</p>
<pre>:~# docker-compose down</pre>
<p>So, that is it.</p>
<h1>Conclusion</h1>
<p>Using the best tools is vital for good server management results. Docker is an example of this. With this technology, it is possible to display images in a simple way and guaranteeing the compatibility of the programs.</p>
<p>Please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-docker-compose-on-centos-7/">How to install Docker Compose on CentOS 7?</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/how-to-install-docker-compose-on-centos-7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
