From 2cd8f2b4685def02627b575cd4fce3434d2f4147 Mon Sep 17 00:00:00 2001 From: lyk Date: Thu, 22 Aug 2024 09:32:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++++++ README.md | 18 ++++++++++++++++++ docker-compose.yml | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 docker-compose.yml 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