Create Dockerfile
Browse files- Dockerfile +48 -0
Dockerfile
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:20.04
|
| 2 |
+
|
| 3 |
+
# install dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
apt-transport-https \
|
| 6 |
+
ca-certificates \
|
| 7 |
+
curl \
|
| 8 |
+
software-properties-common \
|
| 9 |
+
&& add-apt-repository ppa:ondrej/php \
|
| 10 |
+
&& apt-get update && apt-get install -y \
|
| 11 |
+
php8.0 \
|
| 12 |
+
php8.0-cli \
|
| 13 |
+
php8.0-fpm \
|
| 14 |
+
php8.0-mysql \
|
| 15 |
+
php8.0-pdo \
|
| 16 |
+
php8.0-tokenizer \
|
| 17 |
+
php8.0-mbstring \
|
| 18 |
+
php8.0-curl \
|
| 19 |
+
php8.0-zip \
|
| 20 |
+
php8.0-xml \
|
| 21 |
+
nginx \
|
| 22 |
+
mariadb-server \
|
| 23 |
+
git \
|
| 24 |
+
unzip \
|
| 25 |
+
&& apt-get clean
|
| 26 |
+
|
| 27 |
+
# set working directory
|
| 28 |
+
WORKDIR /var/www/pterodactyl
|
| 29 |
+
|
| 30 |
+
# clone pterodactyl panel
|
| 31 |
+
RUN git clone https://github.com/pterodactyl/panel.git . \
|
| 32 |
+
&& git checkout tags/v1.0.0-beta.6 \
|
| 33 |
+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
| 34 |
+
&& composer install --no-dev --optimize-autoloader
|
| 35 |
+
|
| 36 |
+
# set permissions
|
| 37 |
+
RUN chown -R www-data:www-data /var/www/pterodactyl/*
|
| 38 |
+
|
| 39 |
+
# configure nginx
|
| 40 |
+
COPY ./nginx.conf /etc/nginx/sites-available/pterodactyl
|
| 41 |
+
RUN ln -s /etc/nginx/sites-available/pterodactyl /etc/nginx/sites-enabled/pterodactyl \
|
| 42 |
+
&& rm /etc/nginx/sites-enabled/default
|
| 43 |
+
|
| 44 |
+
# expose port
|
| 45 |
+
EXPOSE 7860
|
| 46 |
+
|
| 47 |
+
# start services
|
| 48 |
+
CMD service nginx start && php-fpm8.0 -F
|