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?

  • Docker and rancher
  • Docker: Logging From Both App and Server In One Container
  • Docker, web app static files. Best practices?
  • How to connect to containers on docker Overlay network from an external machine
  • docker-machine error, when I try to create
  • ZAP ScriptWriter synch error
  • Exception trying to run ASP.NET 5 Docker container
  • ECS Docker Container get env variable running cron
  • Golang docker library image cannot find go tool in $PATH
  • Dockerfile dependency installed properly but resulting image doesn't have it
  • Have to set up eval $(dinghy env) everytime. Cannot connect to the Docker daemon. Is the docker daemon running on this host?
  • Dynamically set JAVA_HOME of 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.