User Tools

Site Tools


wiki:qclug_presentations:docker:demo

This is an old revision of the document!


DEMO

docker search centos | grep php

Pull down and run command Hello World on your container\ docker run jdeathe/centos-ssh-apache-php echo “hello”

#View the history of what your ran in your container docker ps -a

#Run another command from your container docker run jdeathe/centos-ssh-apache-php echo “hello2”

#Interactive Login of your container docker run -i -t jdeathe/centos-ssh-apache-php /bin/bash

#Interactive Login of your container attaching it to a local port 81 docker run -i -t -p 192.168.1.101:81:80 jdeathe/centos-ssh-apache-php /bin/bash

#Copy wiki files rsync -axP 192.168.1.101:/var/www/ /var/www/ rsync -axP 192.168.1.101:/etc/httpd/ /etc/httpd/

#start httpd service httpd start

When i Exit i loose everything that i just did :(

I guess ill try to commit my changes and create my own image docker commit <imagename>

#Run docker container using local drives, interactive docker run -i -t -p 192.168.1.101:81:80 -v /var/www:/var/www -v /etc/httpd/:/etc/httpd/ jdeathe/centos-ssh-apache-php /bin/bash

#Run docker container user local drives, damonized docker run -d -p 192.168.1.101:81:80 -v /var/www:/var/www -v /etc/httpd/:/etc/httpd/ jdeathe/centos-ssh-apache-php /usr/sbin/httpd -DFOREGROUND

This still isnt good enough for me i want it to me more automated

DOCKERFILE Copy all data from local host via RSYNC and run the container attaching it to port 81 of my lo cal host

DOCKERFILE WITH DATA CONTAINER Copy all data from local host to a data container to allow change

DEPLOY WORDPRESS SITE Combine multiple images from dockerhub to build a functional WORDPRESS Site

wiki/qclug_presentations/docker/demo.1423627433.txt.gz · Last modified: 2015/02/11 04:03 by Travis Vaske