※こちらは旧サイトです(新サイトはこちら)
CentOSで書いていますが概ねDebianとかでも同じだと思います
サンプルです
version: "2"
services:
Pthread:
container_name: [IMAGE]
hostname: Pthread
image: [IMAGE]:latest
networks:
b0:
ipv4_address: x.x.x.x
$ docker-compose run Pthread php /path/to/multi_thread.php
こちらのサイトのサンプルがわかりやすかったです