y12studio / y12io

online service evaluation
Apache License 2.0
4 stars 0 forks source link

PHP Docker Image #4

Closed y12studio closed 10 years ago

y12studio commented 10 years ago

v1 darh/php-essentials

darh/php-essentials Repository | Docker Index

$ sudo docker.io run darh/php-essentials
/bin/sh: 1: [/usr/bin/php: not found

v2 tutum/apache-php

tutum/apache-php Repository | Docker Index

$ sudo docker.io run -d -p 80 tutum/apache-php
9aa5634df578c29abbedc597a4b219860aa96993fddae23af6d937dfac5a3f55
$ sudo docker.io port 9aa5 80
0.0.0.0:49153
$ curl http://localhost:49153
// or host's browser to http://bridge-ip:49153
$ sudo docker.io ps
$ sudo docker.io kill pid
// another app
$ sudo docker.io run -d tutum/apache-php git clone https://github.com/pusher/pusher-realtime-chat-widget /app
9ab9200ae8cc33ef865ede4b92d19babbc0c4ad94f230aff4306e073f72fd428
$ sudo docker.io commit 9ab92 test/vm2
5d6b72841bf2d12edcd0bf39829e61adfcd9d943ea14e3b14af9a94a841f80ab
$ sudo docker.io run -d -p 80 test/vm2 /run.sh
99cdcb927b839666ea4b9de1a44db60284ec2e1d956930f7243708ce763001bb
$ sudo docker.io ps
CONTAINER ID        IMAGE                         COMMAND             CREATED             STATUS              PORTS                   NAMES
99cdcb927b83        test/vm2:latest               /run.sh             15 seconds ago      Up 15 seconds       0.0.0.0:49159->80/tcp   goofy_torvalds
$ curl http://localhost:49159/src/