docker-compose 搭建 lamp 应用

最后更新于:2022-04-02 03:06:45

[TOC] ## 概述 安装libpng时需要zlib-devel 安装php时需要libtool、libtool-ltdl、libtool-ltdl-devel 安装mysql时需要bison、ncurses-devel ## 实例
Dockerfile ``` FROM centos:7 RUN yum install -y net-tools \ libgomp.x86_64 \ libtool-ltdl-devel.x86_64 \ psmisc.x86_64 \ gdb \ gd ADD ./im_server.tar.gz /root/ RUN cd /root/oneinstack \ && ./install.sh -a WORKDIR /home/im_user/im_server/im_webserver ENTRYPOINT ["/bin/bash"] #ENTRYPOINT ["/etc/init.d/bigant_control" , "start"] ```

docker-compose.yaml ``` # yaml配置 version: '3' services: s6_175: build: . image: ant_server container_name: s7_17 restart: always tty: true networks: mynet: ipv4_address: 192.168.0.78 privileged: true mynet: driver: macvlan driver_opts: parent: eth0 ipam: config: - subnet: 192.168.0.0/23 ```

';