1
0
Fork 0

📦 build(mcy-shop): add dockerfile for php application

- create new dockerfile based on php:8-apache-bookworm
- install required system dependencies (git, image libraries, zip)
- configure and install php extensions (gd, pdo_mysql, zip)
- clone mcy-shop repository and checkout specified ref
- clean up git files and set proper permissions
- enable apache rewrite module for url routing
This commit is contained in:
pooneyy 2025-10-03 20:21:51 +08:00
parent d163caa5ba
commit 4dcb305a95
No known key found for this signature in database
1 changed files with 21 additions and 0 deletions

21
apps/mcy-shop/Dockerfile Normal file
View File

@ -0,0 +1,21 @@
From php:8-apache-bookworm
ARG REF main
RUN apt-get update && apt-get install -y \
git \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libwebp-dev \
libzip-dev && \
docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg --with-webp && \
docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd && \
docker-php-ext-configure zip && \
docker-php-ext-install gd pdo_mysql zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
git config --global --add safe.directory /var/www/html && \
git clone https://github.com/lizhipay/mcy-shop . && \
git checkout $REF && \
rm -rf .git && \
chmod -R 777 ./* && \
a2enmod rewrite