chore: fix dockerfile, closes #45

This commit is contained in:
badPointer 2023-03-03 04:48:31 +00:00
parent 1873b9c1db
commit 02a5e24b86

View file

@ -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 ./*