refactor: clean up docker build for release channel
This commit is contained in:
parent
4553406ee8
commit
a27c0b5e9b
2 changed files with 1 additions and 1 deletions
61
Dockerfile.release
Normal file
61
Dockerfile.release
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
FROM ubuntu:22.04 as base
|
||||
|
||||
RUN apt update && apt -y install \
|
||||
software-properties-common \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
gnupg \
|
||||
curl
|
||||
|
||||
# Add Ondrej Sury's PPA for PHP
|
||||
RUN LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php \
|
||||
&& apt update
|
||||
|
||||
# Install PHP 8.1
|
||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt -y install \
|
||||
php8.1 \
|
||||
php8.1-common \
|
||||
php8.1-cli \
|
||||
php8.1-gd \
|
||||
php8.1-mysql \
|
||||
php8.1-mbstring \
|
||||
php8.1-bcmath \
|
||||
php8.1-xml \
|
||||
php8.1-fpm \
|
||||
php8.1-curl \
|
||||
php8.1-zip \
|
||||
unzip \
|
||||
tar \
|
||||
git
|
||||
|
||||
RUN rm -rf /var/lib/apt && \
|
||||
rm -rf /var/lib/dpkg && \
|
||||
rm -rf /var/lib/cache && \
|
||||
rm -rf /var/lib/log
|
||||
|
||||
FROM base as builder
|
||||
ARG PTERODACTYL_PANEL_VERSION="latest"
|
||||
|
||||
WORKDIR /var/www/pterodactyl
|
||||
|
||||
# Install composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# Download the Pterodactyl Panel
|
||||
RUN curl -Lo panel.tar.gz https://github.com/pterodactyl/panel/releases/${PTERODACTYL_PANEL_VERSION}/download/panel.tar.gz
|
||||
RUN curl -Lo checksum.txt https://github.com/pterodactyl/panel/releases/${PTERODACTYL_PANEL_VERSION}/download/checksum.txt
|
||||
|
||||
RUN sha256sum -c checksum.txt
|
||||
|
||||
# Unpack the Pterodactyl Panel
|
||||
RUN tar -xzvf panel.tar.gz
|
||||
|
||||
# Install dependencies
|
||||
RUN composer install --no-dev --optimize-autoloader
|
||||
|
||||
FROM base as app
|
||||
|
||||
WORKDIR /var/www/pterodactyl
|
||||
USER www-data
|
||||
|
||||
COPY --from=builder --chown=www-data:www-data /var/www/pterodactyl /var/www/pterodactyl
|
||||
Reference in a new issue