全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 680|回复: 6

麻烦推荐个一键docker安装php+mysql环境

[复制链接]
发表于 2023-2-3 17:18:25 | 显示全部楼层 |阅读模式
想装个wp博客玩玩,想在op下的docker一键搞个php环境系统
简单易用的  有没有啥推荐的

谢谢大佬
发表于 2023-2-3 17:30:57 | 显示全部楼层
你为啥不直接一键docker wordpress?
发表于 2023-2-3 17:59:12 | 显示全部楼层
可以docker 安装宝塔,
发表于 2023-2-3 18:00:55 | 显示全部楼层
总感觉数据库还是别放docker了
发表于 2023-2-3 18:01:36 | 显示全部楼层
数据库放Docker得心多大啊...
发表于 2023-2-3 22:44:07 | 显示全部楼层
https://github.com/yeszao/dnmp
发表于 2023-2-5 10:30:43 | 显示全部楼层
本帖最后由 0x99 于 2023-2-5 12:34 编辑

# Use an official PHP image as the base image
FROM php:8.1-apache

# Set the working directory in the container to /var/www/html
WORKDIR /var/www/html

# Install necessary extensions for PHP
RUN apt-get update && apt-get install -y \
    libicu-dev \
    libpq-dev \
    libpng-dev \
    libjpeg-dev \
    libfreetype6-dev \
    libexif-dev \
    wget \
    libzip-dev \
    zlib1g-dev \
    && docker-php-ext-configure gd --with-jpeg --with-freetype \
    && docker-php-ext-install -j$(nproc) intl gd pdo_pgsql pdo_mysql exif zip \
    && a2enmod rewrite

# Expose port 80 for Apache
EXPOSE 80

# Set the command to run when the container starts
CMD ["apache2-foreground"]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-14 10:20 , Processed in 0.083980 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表