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

51 lines
1.8 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
2020-03-18 19:31:56 +01:00
ENV PANEL_VERSION=v0.7.17
2018-06-09 16:40:54 +10:00
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; \
docker-php-ext-install bcmath; \
apk add --no-cache libpng-dev; \
docker-php-ext-install gd; \
docker-php-ext-install mbstring; \
docker-php-ext-install pdo; \
docker-php-ext-install pdo_mysql; \
docker-php-ext-install tokenizer; \
apk add --no-cache libxml2-dev; \
docker-php-ext-install xml; \
docker-php-ext-install zip; \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
2017-12-23 15:11:21 -08:00
# Set up the server working directories.
RUN adduser -g '' -D -u 9999 pterodactyl; \
mkdir -p /var/www/html/env; \
mkdir -p /var/www/html/pterodactyl
2017-12-23 15:11:21 -08:00
WORKDIR /var/www/html/pterodactyl
RUN chown -R pterodactyl:pterodactyl /var/www/html/pterodactyl /var/www/html/env
2017-12-23 15:11:21 -08:00
# Deploy panel files.
2018-02-17 21:55:50 -08:00
USER pterodactyl:pterodactyl
RUN curl -Lo panel.tar.gz https://github.com/Pterodactyl/Panel/releases/download/${PANEL_VERSION}/panel.tar.gz; \
tar --strip-components=1 -xzvf panel.tar.gz; \
cp .env.example /var/www/html/env/.env; \
ln -s /var/www/html/env/.env /var/www/html/pterodactyl/.env; \
composer install --no-dev --optimize-autoloader; \
chmod -R 755 storage/* bootstrap/cache
2017-12-23 15:11:21 -08:00
# 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
2018-02-17 22:08:51 -08:00
COPY upgrade.sh /usr/local/bin/upgrade
2019-07-29 12:15:36 +02:00
COPY schedule .
2017-12-23 15:11:21 -08:00
COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY www.conf /usr/local/etc/php-fpm.d/www.conf
2019-07-29 12:15:36 +02:00
RUN cat schedule >> /var/spool/cron/crontabs/root; \
chmod +x /usr/local/bin/install; \
chmod +x /usr/local/bin/upgrade
2017-12-23 15:11:21 -08:00
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]