Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Docker to quickly build LEMP Environment

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today Xiaobian to share with you how to use Docker to quickly build LEMP environment related knowledge points, detailed content, clear logic, I believe most people still know too much about this knowledge, so share this article for everyone to refer to, I hope you read this article after some harvest, let's learn about it together.

container

container name Version metowolf/php7.3.1, 7.3, 7, currentmetowolf/nginx1.15.8, 1.15, 1, currentmysql/mysql-server8.0.15phpmyadmin/phpmyadmin4.8.5abiosoft/caddy0.11.2redis5.0.3-alpine

demo

Let me give you a simple example.

First you need to install docker and docker-compose environments. For ease of demonstration, here is a direct use of pwd's trial host to run.

$ curl -fssl https://get.docker.com -o get-docker.sh$ sh get-docker.sh$ curl -l "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose$ chmod +x /usr/local/bin/docker-compose

Log in to the server and pull the layout template

$ git clone https://github.com/metowolf/docker-lemp.git$ cd docker-lemp

create a profile

$ cp .env.example .env$ cp docker-compose.example.yml docker-compose.yml

Create nginx configuration

$ cat > etc/nginx/config/example.conf

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report