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?

  • Failed to allocate gateway with docker stack
  • Register an instance to an AWS ECS cluster
  • docker as service parameter
  • docker compose with build --pull option
  • How can I get cadvisor (Docker) working with AWS/Debian?
  • Vagrant or Docker for environment development
  • how to forward request to docker machine in local network in OSX
  • Localhost connect MySQL Docker confusion
  • Can I build a Docker image to “cache” a yocto/bitbake build?
  • Why rotated nginx in Docker log file not release in filesystem?
  • Eureka clients in docker container
  • Docker API can’t apply json filters
  • 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.