Docker — Building an environment with multiple PHP versions on a single Nginx server
<p>We often work with systems that run on different software versions. Therefore, we need tools that allow us to compile / interpret / execute our code according to the context where we are.</p>
<p>In this article we will see how to create a development environment with Docker that will allow:</p>
<ul>
<li>Use multiple PHP containers with different versions (in this guide we will install FPM 7.4 and 8.2).</li>
<li>Configure an Nginx container as a web server to redirect requests to the PHP container that should act as interpreter based on the URL and port.</li>
</ul>
<p><em> I will explain everything in detail, but I understand that you know Docker and how it works.</em></p>
<h2>Getting started with Docker </h2>
<p>You need to have Docker installed on your machine. After that, if you don’t have a Docker Desktop environment, you can use <a href="https://www.portainer.io/" rel="noopener ugc nofollow" target="_blank">Portainer</a> for quick management of all your containers.</p>
<p><a href="https://medium.com/@joseclementegarciarodriguez/docker-building-an-environment-with-multiple-php-versions-on-a-single-nginx-server-438108addd28"><strong>Visit Now</strong></a></p>