I'm attempting to Dockerize a PHP application that uses IonCube encryption.
The application, stand alone with IonCube runs fine, when i try to Dockerize this with a lean image (Docker, Alpine, PHP7.0) its only failing around the IonCube install.
Steps taken:
- Followed the displayed IonCube instructions to install.
- After attempted install, navigated to directories within the Docker image to confirm COPY has executed correctly and all related files show in the image by using "docker exec -it image_name /bin/sh".
- Although the files show as per above command and after checking the image, a message in Powershell shows: "Failed loading /usr/lib/php7/modules/ioncube_loader_lin_7.0.so: Error relocating /usr/lib/php7/modules/ioncube_loader_lin_7.0.so: __strtod_internal: symbol not found".
- Again accessed the docker image "docker exec -it image_name /bin/sh" and the files show. But it appears to be unable to load the .SO file.
- Initially thought maybe its a directory permissions issue, but still no luck when i chmod the dir to 777.
Has anyone hit this problem in the past?
Dockerfile contents:
FROM richarvey/nginx-php-fpm:php7
COPY web /www
RUN chmod -R 777 /usr/lib/php7/modules
COPY web/ioncube/linux-64 /usr/lib/php7/modules
COPY web/ioncube/linux-64-ini /etc/php7/conf.d
WORKDIR /www
IonCube loader-wizard.php Instructions:
- Download one of the following archives of Loaders for Linux x86-64:
- tar.gz
- tar.bz2
- Put the Loader files in /usr/lib/php7/modules
- Edit the file /etc/php7/conf.d/00_ioncube.ini and before any other zend_extension lines ensure that the following is included: zend_extension = /usr/lib/php7/modules/ioncube_loader_lin_7.0.so
- Restart the server software.
Still after executing the above, checking that the respective files exist in the respective directory within Alpine, I then, destroy the docker image, build, and then run it, but no Joy. I then also tried just restarting the docker image instead of "docker rm image_name" in case it was destroying the installed IonCube related changes, but again still no luck.
I'm at a bit of a loss.
Any pointers or guidance appreciated.