snappy core

Secure base server first:- https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04

Then some more with this:- https://www.digitalocean.com/community/tutorials/additional-recommended-steps-for-new-ubuntu-14-04-servers

Then install nginx in docker:-

https://www.digitalocean.com/community/tutorials/docker-explained-how-to-containerize-and-use-nginx-as-a-proxy

sudo docker run -i -t -p 80:80 ubuntu /bin/bash

!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Remember: You will be attached to the container you create. In order to detach yourself and go back to your main terminal access point, run the escape sequence: CTRL+P followed by CTRL+Q. Being attached to a docker container is like being connected to a new droplet from inside another.

To attach yourself back to this container:

List all running containers using sudo docker ps Find its ID Use sudo docker attach [id] to attach back to its terminal

user@Docker:~$ sudo docker attach c1a23d62a5f2

FATA[0000] You cannot attach to a stopped container, start it first

user@Docker:~$ sudo docker start c1a23d62a5f2

user@Docker:~$ sudo docker attach c1a23d62a5f2

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

echo “deb http://archive.ubuntu.com/ubuntu/ raring main universe” » /etc/apt/sources.list

apt-get update

apt-get install -y nano \
                   wget \
                   dialog \
                   net-tools  
                  
 apt-get install -y nginx    

 sudo apt-get install php5-fpm php5-gd 

sudo nano /etc/php5/fpm/php.ini

Search for and adjust the cgi.fix_pathinfo parameter so that it reads like this:

cgi.fix_pathinfo=0 Save and close the file when you are done.

sudo nano /etc/nginx/sites-available/default

uncomment the php stuff and add the two additional “location” lines. These two lines fix the “not secure” message during setup, but this is not as good as moving the directories out of the document root (which I couldn't get to work)

 location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
        #       # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
        #
        #       # With php5-cgi alone:
        #       fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
        }
        
        location ~ /(data|conf|bin|inc)/ {
        deny all;

nano /usr/share/nginx/html/phpinfo.php <?php phpinfo(); ?>

start services and check that phpinfo displays

sudo nginx

sudo php5-fpm or

sudo restart php5-fpm

sudo nginx -s reload


moving directories.

My current theory is that DokuWiki needs to run through its complete install routine before the local.php file is created and made to point to a new location for the /data folders.

followed this, but could not configure dokuwiki to access the moved directories.

https://www.dokuwiki.org/security

full install guide for dokuwiki on nginx

https://www.digitalocean.com/community/tutorials/how-to-install-dokuwiki-with-nginx-on-an-ubuntu-12-04-vps

premade nginx for docker from nginx:-

http://nginx.com/blog/deploying-nginx-nginx-plus-docker/

docker security:-

https://docs.docker.com/articles/security/

docker hub prebuilt dokuwiki:-

https://registry.hub.docker.com/u/vimagick/dokuwiki/

small docker images:-

http://www.centurylinklabs.com/small-docker-images-for-go-apps/?utm_source=CenturyLink+Labs+List&utm_campaign=3015fcab05-Weekly_Lab_Blast_September_16th_9_25_2014&utm_medium=email&utm_term=0_d971fc65c9-3015fcab05-147419081

smallest docker app:-

http://blog.xebia.com/2014/07/04/create-the-smallest-possible-docker-container/

smaller ubuntu snappy/core for docker http://www.ubuntu.com/cloud/tools/snappy#snappy-vagrant