1
0
Fork 0
This repository has been archived on 2025-01-12. You can view files and clone it, but cannot push or open issues or pull requests.
pterodactyl-panel-docker/services/php/Dockerfile

47 lines
1.7 KiB
Text
Raw Normal View History

2018-02-17 20:22:48 -08:00
FROM php:7.2-fpm-alpine
2017-12-23 15:11:21 -08:00
# Set up all the dependencies for the PHP container.
RUN apk add --no-cache curl git supervisor tar unzip
RUN docker-php-ext-install bcmath
# https://github.com/docker-library/php/issues/483
# RUN docker-php-ext-install curl
# https://stackoverflow.com/questions/39657058/installing-gd-in-docker#39658592
RUN apk add --no-cache libpng-dev
RUN docker-php-ext-install gd
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install pdo
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install tokenizer
# https://lists.alpinelinux.org/alpine-aports/2526.html
RUN apk add --no-cache libxml2-dev
RUN docker-php-ext-install xml
RUN docker-php-ext-install zip
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set up the server working directory.
2018-02-17 21:55:50 -08:00
RUN adduser -g '' -D -u 9999 pterodactyl
2017-12-23 15:11:21 -08:00
RUN mkdir -p /var/www/html/pterodactyl
WORKDIR /var/www/html/pterodactyl
2018-02-17 21:55:50 -08:00
RUN chown -R pterodactyl:pterodactyl /var/www/html/pterodactyl
2017-12-23 15:11:21 -08:00
# Deploy panel files.
2018-02-17 21:55:50 -08:00
USER pterodactyl:pterodactyl
2018-02-17 20:22:48 -08:00
RUN curl -Lo panel.tar.gz https://github.com/Pterodactyl/Panel/releases/download/v0.7.0/panel.tar.gz
RUN tar --strip-components=1 -xzvf panel.tar.gz
RUN cp .env.example .env
2017-12-23 15:11:21 -08:00
RUN composer install --no-dev
RUN chmod -R 755 storage/* bootstrap/cache
# Copy the remaining configuration files.
USER root:root
RUN mkdir -p /var/log/pterodactyl
2018-02-17 21:59:12 -08:00
COPY install.sh /usr/local/bin/install
RUN chmod +x /usr/local/bin/install
2018-02-17 22:08:51 -08:00
COPY upgrade.sh /usr/local/bin/upgrade
RUN chmod +x /usr/local/bin/upgrade
2017-12-23 15:11:21 -08:00
COPY schedule /var/spoon/cron/crontabs/schedule
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY www.conf /usr/local/etc/php-fpm.d/www.conf
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]