Skip to content

sebastian-colomar/kpn-phpinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

phpinfo

https://labs.play-with-docker.com/

mkdir phpinfo/
echo '<?php phpinfo();?>' | tee phpinfo/index.php
docker images
docker pull docker.io/library/php:alpine
docker images

php -f index.php -S 0.0.0.0:8080

docker run --detach --name phpinfo --publish 8080 --volume $PWD/phpinfo:/phpinfo --workdir /phpinfo docker.io/library/php:alpine php -f index.php -S 0.0.0.0:8080
docker ps
docker top phpinfo
docker logs phpinfo
docker swarm init --advertise-addr $( hostname -i )
docker node ls
mkdir /tmp/phpinfo/
echo '<?php phpinfo();?>' | tee /tmp/phpinfo/index.php
tee docker-compose.yaml 0<<EOF

services:
  phpinfo:
    command:
      - php
      - -f
      - index.php
      - -S
      - 0.0.0.0:8080
    image: docker.io/library/php:alpine
    ports:
      - 8080
    volumes:
      - /tmp/phpinfo:/phpinfo
    working_dir: /phpinfo
version: "3.8"

EOF
docker stack deploy -c docker-compose.yaml phpinfo
docker stack ls
docker stack ps phpinfo
docker stack services phpinfo