S
S
Samuello2020-03-02 08:10:10
PHP
Samuello, 2020-03-02 08:10:10

Why is the php-bcmath extension not being installed?

Good day, I'm trying to raise a container on the docker, but for some reason the php-bcmath extension is not installed.

The DockerFile itself

FROM ubuntu:18.04

# Устанавливаем время
ENV TZ=Asia/Almaty
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Создаем рабочую папку
RUN mkdir /var/www
WORKDIR /var/www


# Обновляем APT
RUN apt-get update -y

# Устанавливаем системные зависимости
RUN apt-get install -y nano git mc net-tools cron curl software-properties-common


# Устанавливаем PHP7
RUN ln -sf /var/log/php7.3-fpm.log /dev/stdout
RUN add-apt-repository ppa:ondrej/php -y
RUN apt-get update -y
RUN apt-get install -y php7.3 php7.3-fpm php7.3-pgsql php7.3-curl php7.3-dom php7.3-gd php7.3-mbstring php7.3-zip php-soap php-dompdf <b>php-bcmath</b> php7.3-ldap
RUN sed -i -e "s/pid =.*/pid = \/var\/run\/php7.3-fpm.pid/" /etc/php/7.3/fpm/php-fpm.conf
RUN sed -i -e "s/error_log =.*/error_log = \/proc\/self\/fd\/2/" /etc/php/7.3/fpm/php-fpm.conf
RUN sed -i -e "s/;daemonize\s*=\s*yes/daemonize = no/g" /etc/php/7.3/fpm/php-fpm.conf
RUN sed -i "s/listen = .*/listen = 9000/" /etc/php/7.3/fpm/pool.d/www.conf
RUN sed -i "s/;catch_workers_output = .*/catch_workers_output = yes/" /etc/php/7.3/fpm/pool.d/www.conf

# Устанавливаем composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && php composer-setup.php --install-dir=/usr/bin --filename=composer && chmod +x /usr/bin/composer && php -r "unlink('composer-setup.php');"

# Устанавливаем npm
RUN apt-get install -y npm

ENTRYPOINT php-fpm7.3
CMD ["-F", "-R"]

EXPOSE 9000



It is not in the list of extensions
D0MVPCCMEaE.jpg

Although if you try to install through the terminal, it says that it is already installed
LySa9sCTSLA.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vamp, 2020-03-02
@Samuello

Because you need to install the php7.3-bcmath package . On your screenshot, you can see that the module version for PHP 7.4 is installed: php-bcmath is already the newest version (2: 7.4 +73+ubuntu18.04.1+deb.sury.org+1)

K
Kirill Nesmeyanov, 2020-03-02
@SerafimArts

RUN docker-php-ext-enable bcmath
PS Or not, now I looked - the build is custom, not off., where there is "docker-php-ext-enable". But in any case, I think it should be included in php.ini simply.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question