The SOAP client is not installed for PHP Docker containers, i want know what is the correct way to use it ?
Note: i'm using a PHP 7.4 image build with docker-compose & Dockefile
CodePudding user response:
Step 1: add this line in the Dockerfile :
RUN apt-get update && apt-get install -y \
libxml2-dev \
RUN docker-php-ext-install soap
Step 2: In php.ini, find remove the commenting semicolon at the beginning of the line:
extension=php_soap.dll
or
extension=soap
Step 3: rebuild the image with this command:
docker-compose up -d --force-recreate --build
Step 4: With phpinfo() check if Soap Client is enabled :