製作 Alpine php 支援 mysql 的 Docker Image
- Dockerfile
FROM php:7.4.33-cli-alpine3.16 RUN apk update && apk upgrade RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql COPY app /var/www/html WORKDIR /var/www/html EXPOSE 80 CMD ["php", "-S", "0.0.0.0:80"]