

This article expects you already have Docker installed on your machine and have root privileges and know some terminal commands. You can skip the whole article and scroll down to download from my github repository. Sometimes you want to run different PHP version depending on a project or perhaps you want to revive legacy ones, run https SSL locally because WebRTC only works secured environment or even attach a Node project with socket file.Īnd you don't want to pollute your machine with development files unless containerized.įor this guide I let you install some Docker containers, working with Nginx configurations, connect containers, run docker commands, have SSL Certificates on your localhost. I have to install MAMP / XAMP with some brew installations, without a clue where all those files being installed. If you have not yet installed a database server in Docker, then in the article How to install MariaDB in Docker we will look at how to do this, and we will see how to deploy this server, databases with phpMyAdmin.Every time I have a new computer whether it be a MacBook or PC (PopOS). In the Server field, enter the IP of the database server, in the Username field - the user (in this case, it is root), in the Password field - the password of the database server root user. To connect to PhpMyAdmin - open a browser and go to - Now we can connect the database server. We are waiting for the download of images, and deployment.ĭocker run -d -restart always -name phpmyadmin -e PMA_ARBITRARY=1 -p 8090:80 phpmyadmin Run our script (for this you need to be in the directory where our file was created. Where: phpmyadmin: name of your container image: phpmyadmin: image from which phpmyadmin will be deployed 8090:80 - port 8090 which we will use to connect to phpmyadmin restart:always - indicates that the container will be restarted when the server crashes or restarts PMA_ARBITRARY=1 - indicates that it is possible to connect to an arbitrary database server (How to bind a phpmyadmin panel to a specific server can be found in this article) Let's use the repository to create the docker-compose.yaml file at Ĭreate a docker-compose.yaml or docker-compose.yml file, You can also use a different directory to host this and other projects. Mkdir /home/phpmyadmin & cd /home/phpmyadmin To navigate in the future where and what we have installed, let's create a separate folder for this project in the /home directory and go to it. Let's create a *.yaml file for Docker-Compose. Curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin /docker-compose
