From 02a5e24b8623571a4f9cf9f91d31e7df627da5d2 Mon Sep 17 00:00:00 2001 From: badPointer Date: Fri, 3 Mar 2023 04:48:31 +0000 Subject: [PATCH] chore: fix dockerfile, closes #45 --- Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6623c11..64b6465 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,12 +29,12 @@ WORKDIR /tmp RUN apt update -yqq; \ apt install git libpq-dev libzip-dev zip make wget gnupg -yqq -# Download phive +# Download phive and install phab RUN wget -O phive.phar https://phar.io/releases/phive.phar; \ wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc; \ gpg --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79; \ gpg --verify phive.phar.asc phive.phar; \ - rm phive.phar.asc + rm phive.phar.asc; ./phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C # Download the latest version of ncc (Nosial Code Compiler) RUN git clone https://git.n64.cc/nosial/ncc.git; \ @@ -46,11 +46,19 @@ RUN git clone https://git.n64.cc/nosial/ncc.git; FROM php:8.1-alpine +# Add extensions +ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ + # Copy downloaded files COPY --from=builder /tmp/. . -# Install phive... -RUN chmod +x phive.phar; \ +# Install extensions required to run ncc +RUN install-php-extensions mbstring \ + ctype \ + common; \ + + # Install phive, phab and ncc + chmod +x phive.phar; \ mv phive.phar /usr/local/bin/phive; \ phive install phpab --global --trust-gpg-keys 0x2A8299CE842DD38C; \ cd ncc; php build/src/INSTALL --auto --install-composer; cd ..; rm -rf ./*