FROM php:5.6-apache
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
基于PHP官方镜像的5.6-apache版本,添加MySQL的数据库驱动即可。
version: "3.8"
services:
eolinker:
image: eolinker:5.0
build:
context: ./
dockerfile: Dockerfile
container_name: eolinker5
hostname: eolinker5
ports:
- 18080:80
volumes:
- ./data/html:/var/www/html
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
# - ./data/conf.d/:/usr/local/etc/php/conf.d
deploy:
resources:
limits:
memory: 2048M
cd /opt/dockers/eolinker5/data/
chmod 777 -R html
sudo docker-compose up
为了方便查看日志,暂时没有后台运行,这个窗口先不要动,然后去访问 http://ip:18080/eolinker_os进行配置
需要准备一个MySQL数据库,我这里暂时用已有的,如果没有可以docker部署一个。
地址:https://www.leftso.com/article/1034.html