Enable soap for php in docker container
enable soap in php
docker image for php
sudo apt get install soap
ubuntu 18.04 php soap
how to install soap in linux
I have been unable to get soap to work with my php Docker setup.
I am using Docker CE for Windows Version 18.03.1-ce-win65 (17513). PHP version 7.2.3
I've tried running from inside the container
apt-get install php-soap which results in
Reading package lists... Done
Building dependency tree
Reading state information... Done*
Package php-soap is a virtual package provided by:
* php7.0-soap 7.0.27-0+deb9u1 [Not candidate version]*
E: Package 'php-soap' has no installation candidate
results in the error configure: error: libxml2 not found. Please check your libxml2 installation.
However when looking at php info I see the following: libxml2 Version => 2.9.4
You will need to install libxml2-dev as part of your dockerfile, the image is kept to a minimum and doesn't include all of the bits needed by every module. Although the image may have the main package, the -dev package includes the components needed to compile other modules which rely on it...
RUN apt-get update && \ apt-get install -y libxml2-dev
Setting up php-soap in Docker, dockerfile RUN apt-get update -y \ && apt-get install -y \ libxml2-dev \ php-soap \ && apt-get clean -y \ && docker-php-ext-install soap. The great In order to keep the images smaller, PHP's source is kept in a compressed tar file. To facilitate linking of PHP's source with any extension, we also provide the helper script docker-php-source to easily extract the tar or delete the extracted source. Note: if you do use docker-php-source to extract the source, be sure to delete it in the same
For me, working with PHP 7.3.2, the other solutions didn't work.
Both "php-soap" and "php7.3-soap" got "phpXXX-soap has no installation candidate" error.
Alone "docker-php-ext-install soap" wanted the "libxml2-dev" so i just installed the necessities:
FROM php:7.3 RUN apt-get update -y \ && apt-get install -y \ libxml2-dev \ && apt-get clean -y \ && docker-php-ext-install soap
... and it worked nicely.
`docker-php-ext-install soap` fails with xml2-config not found · Issue , I have the dockerfile: FROM php:7-apache RUN docker-php-ext-install soap COPY ./ /var/www/html and it tries to install the soap extension, yet /bin/bash apt-get update apt-get install libxml2-dev apt-get install php-soap cd /usr/src/php/ext/soap ./configure make make install docker-php-ext-enable soap Exit the container and in the directory where your docker-compose.yml file is type: docker-compose stop docker-compose start
This is outside the scope of this repo.
You should get it via this approach:
RUN apt-get update -y \ && apt-get install -y \ libxml2-dev \ php-soap \ && apt-get clean -y \ && docker-php-ext-install soap
Enable soap for php in docker container, I've tried running from inside the container apt-get install php-soap which results in Reading package lists Done Building dependency tree Create your first PHP/MySQL application in docker In the first part I discussed how to install and configure Docker for PHP based application. In this post, we will be building a full-fledged PHP application that will be communicating with MySQL.
Use SOAP client in a Docker container, SOAP is a network protocol that enables data to be exchanged between systems and remote This also applies to PHP Docker containers. Most of the time we use Docker CLI to manage Docker Objects such as containers, images, volumes, and networks. But we Also can use Rest API to Manage Docker objects. Originally published at https://devkamboj.in. Docker CLI also uses the Docker rest API to manage Objects. As you can see in the above image.
Enable soap for php in docker container, I have been unable to get soap to work with my php Docker setup. I've tried running from inside the container apt-get install php-soap which Sorry - the config is based on the image it builds from the base image. So use docker images to find the image for php (mine created 'docker_php') and then use docker rmi IMAGEID (replacing it with the one in your listing). Then restart docker and this should rebuild the image with the new options.
Docker PHP 7 Tutorial (7, 7.1, and higher), Learn how to configure PHP 7 with PHP-FPM inside a Docker container in this short docker-php-ext-configure soap --enable-soap \ && docker-php-ext-install # Delete container using ID or name docker rm -f <container-id-or-name> # Delete all available containers docker rm -f $(docker ps -aq) Since our container is an Apache server, it makes sense to have a way to access it through a browser.
- whenever you're configuring and you get that sort of error, you need the "-dev" package
- Thanks. Will that only work as part of the docker build though? I've already run that in the container and the phpinfo suggests it is already installed.
- You should be able to log into the container and run the apt-get install. The install adds the -dev package which is different to the one used by the PHP exe itself.
- Never tried running
docker-php-ext-install soapin the container, so would be interested if that runs.
- I get the error
ERROR: Module soap does not exist!when trying this with
- Thanks ! works perfectly with
- in this case
php-soapwill return an error because there is no such package in php7.2