Last active
July 3, 2024 02:31
-
-
Save TomZhuPlanetart/32dd1aa447f2e486b5ffe5da5da1c5da to your computer and use it in GitHub Desktop.
Dockerfile for PHP 8.2 + Apache on Amazonlinux2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM amazonlinux:2 | |
RUN yum install -y httpd vim | |
RUN amazon-linux-extras enable php8.2 && yum clean metadata | |
RUN yum install -y php-bcmath.x86_64 \ | |
php-cli.x86_64 \ | |
php-dba.x86_64 \ | |
php-dbg.x86_64 \ | |
php-devel.x86_64 \ | |
php-enchant.x86_64 \ | |
php-fpm.x86_64 \ | |
php-gd.x86_64 \ | |
php-gmp.x86_64 \ | |
php-intl.x86_64 \ | |
php-ldap.x86_64 \ | |
php-mbstring.x86_64 \ | |
php-pdo.x86_64 \ | |
php-pear.noarch \ | |
php-process.x86_64 \ | |
php-snmp.x86_64 \ | |
php-soap.x86_64 \ | |
php-xml.x86_64 \ | |
php-opcache.x86_64 \ | |
php-sodium.x86_64 \ | |
php-mysqlnd.x86_64 \ | |
php.x86_64 | |
RUN yum install -y gcc make | |
RUN yes '' | pecl install redis && echo "extension=redis.so" > /etc/php.d/30-redis.ini | |
RUN yes '' | pecl install apcu && echo "extension=apcu.so" > /etc/php.d/30-apcu.ini | |
COPY httpd/ /etc/httpd/ | |
CMD ["/usr/sbin/httpd", "-DFOREGROUND"] | |
# docker run -it \ | |
# -v /var/www/planetart:/var/www/planetart \ | |
# -v /etc/passwd:/etc/passwd:ro \ | |
# -v /etc/group:/etc/group:ro \ | |
# -v /etc/shadow:/etc/shadow:ro \ | |
# -v /logs/:/logs/ \ | |
# -p 10080:80 \ | |
# fbc4bfee86ba /usr/sbin/httpd -DFOREGROUND |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment