commit 2cd8f2b4685def02627b575cd4fce3434d2f4147 Author: lyk Date: Thu Aug 22 09:32:59 2024 +0800 开始 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f5d05dc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM virking/baota +LABEL authors="admin" +LABEL Maintainer="docker 宝塔" +LABEL Description="lnmp Linux." + +RUN set -ex \ +&& export PHP_IDE_CONFIG="serverName=myserver" + +#ENTRYPOINT ["top", "-b"] \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b442340 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# docker lnmp 一键搭建工具 + +### docker文档:https://www.runoob.com/docker/docker-compose.html + +### 执行命令 + +``` +docker-compose up -d +``` + +
+ +### 映射本地目录到容器内 + +``` +volumes: +../../website_data:/www/wwwroot +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0a09097 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,34 @@ +version: "2" +services: + bt: + build: + context: ./ + container_name: bt + hostname: virking-bt + tty: true + privileged: true + restart: always + command: "/sbin/init" + volumes: + - ../../website_data:/www/wwwroot/ + ports: + - "80:80" + - "22:22" + - "8888:8888" + - "888:888" + - "6379:6379" + - "9003:9003" + - "9000:9000" + - "9010:9010" + cap_add: + - SYS_PTRACE + networks: + - default +networks: + default: + driver: bridge + ipam: + driver: default + # 解除下面的注释可以设置网段,用于nginx等容器固定容器IP + #config: + # - subnet: 10.0.0.0/24