PHP-CLI Docker with extension

I want to run php file with one line docker run command.
docker run -v "$PWD":/home -w /home php:5.6-fpm php /home/irc_bot.php
It actually works but within the target file, I use socket_create(), and I got the error "Call to undefined function socket_create()".

Here I’d love to enable it in php.ini. Is it possible? or Do you not a better way to get around it?

  • Intranet name resolution in docker container
  • enable CORS in docker for rails apps rest-client
  • VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes
  • Is there a way to stop, start single task in docker swarm mode?
  • How to access root-folder from dockerfile which isn't in root
  • What is the difference of docker and in ubuntu apt repository?
  • OSX Play Framework Auto-Reload
  • when doing docker compose, is it possible to keep previous docker composition
  • How to move an application based on two linked docker containers to another host?
  • Start mysql automatically when running a Docker container
  • Why don't my udev rules work inside of a running docker container?
  • Getting 502 Bad Gateway while running the Django application within a docker container?
  • One Solution collect form web for “PHP-CLI Docker with extension”

    You should create own conteiner with needed extentions.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.