Skip to content

Instantly share code, notes, and snippets.

@PeterUpfold
Created Feb 16, 2021
Embed
What would you like to do?
Windows-Noob FPM pod Containerfile
FROM centos:latest
# Software updates
RUN dnf -y upgrade && dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm && dnf -y update && dnf -y upgrade && dnf -y install nginx php74-php-fpm php74-php-cli php74-php-devel php74-php-opcache php74-php-common php74-php-mbstring php74-php-gd php74-php-ldap php74-php-process php74-php-gmp php74-php-snmp php74-php-pecl-imagick php74-php-mysqlnd php74-php-json php74-php-pdo php74-php-xml dnf-automatic
# User accounts
RUN useradd -K UID_MIN=10500 -ms /bin/bash windowsnoob
# Primary volume path
RUN mkdir -p /var/www/html/websites/windows
# PHP configuration
COPY php-fpm.d /etc/opt/remi/php74/php-fpm.d/
COPY start-app.sh /
COPY nginx.conf /etc/nginx/nginx.conf
# auto updates
COPY dnf-automatic.conf /etc/dnf/automatic.conf
# Create paths
RUN mkdir -p /home/windowsnoob/php_logs && mkdir -p /home/windowsnoob/php_session
RUN chown windowsnoob:windowsnoob /var/www/html/websites/windows
RUN mkdir -p /home/windowsnoob/nginx_logs
RUN rm -fv -- /etc/opt/remi/php74/php-fpm.d/www.conf
USER windowsnoob
# Start PHP and Nginx
CMD [ "/start-app.sh" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment