This is extremely experimental
-
Create a working folder
-
Inside this folder, choose the
Dockerfile
from/docker
folder in repository. This named with php version likeDockerfileX.X.XX
, and rename it toDockerfile
-
You will need
run.sh
too. Only this two files -
Now create the image with
docker build -t php-gtk3-image .
.php-gtk3-image
is the final image name, and you can change if you want -
Clone the php-gtk3 repository to php-gtk3-source with
git clone git@github.com:scorninpc/php-gtk3.git php-gtk3-source
-
Now you can build source with docker with command
docker run --name php-gtk3-container --rm -v $PWD:/app php-gtk3-image build 4
-
If all works fine, you can test your build with
docker run --name php-gtk3-container --rm -v $PWD:/app php-gtk3-image php -m
. You will seephp-gtk3
extension on the list
-
After compile, you can install compiled locally. Run command
docker run --name php-gtk3-container --rm -v $PWD:/app php-gtk3-image php-copy
. This will create a folder locally calledusr
and some.so
files -
Give user permission to the
usr
withsudo chown $USER:$USER -R $PWD/usr/local/php-gtk3
-
Copy libs to the lib folder with
sudo cp libphpcpp.so.2.3 /lib/
,sudo cp libgladeui-2.so.13 /lib/
andsudo cp libgtksourceview-3.0.so.1 /lib/
-
Move
src/local/php-gtk3
to system folders withsudo mv $PWD/usr/local/php-gtk3 /usr/local/
-
Create the syslink with
sudo ls -s /usr/local/php-gtk3/bin/php /usr/bin/php-gtk3
-
now you should be able to run
php-gtk3
command to execute your scripts