├── .gitignore ├── README.md └── code ├── 4 ├── Dockerfile_template ├── apache2 │ └── Dockerfile ├── sshd │ └── Dockerfile ├── static_web │ └── Dockerfile └── webapp │ └── Dockerfile ├── 5 ├── jenkins │ ├── Dockerfile │ ├── dockerjenkins.sh │ ├── jenkins_multi_shell_step │ ├── jenkins_single_shell_step │ └── plugins.txt ├── sample │ ├── Dockerfile │ ├── nginx │ │ ├── global.conf │ │ └── nginx.conf │ └── website │ │ └── index.html ├── sinatra │ ├── redis-cli │ │ └── Dockerfile │ ├── redis │ │ └── Dockerfile │ ├── webapp │ │ ├── Dockerfile │ │ ├── bin │ │ │ └── webapp │ │ └── lib │ │ │ └── app.rb │ └── webapp_redis │ │ ├── Dockerfile │ │ ├── bin │ │ └── webapp │ │ └── lib │ │ └── app.rb └── website │ ├── Dockerfile │ ├── nginx │ ├── global.conf │ └── nginx.conf │ └── website │ └── index.html ├── 6 ├── jekyll │ ├── apache │ │ └── Dockerfile │ └── jekyll │ │ └── Dockerfile ├── node │ ├── logstash │ │ ├── Dockerfile │ │ └── logstash.conf │ ├── nodejs │ │ ├── Dockerfile │ │ └── nodeapp │ │ │ ├── package.json │ │ │ └── server.js │ ├── redis_base │ │ └── Dockerfile │ ├── redis_primary │ │ └── Dockerfile │ └── redis_replica │ │ └── Dockerfile └── tomcat │ ├── fetcher │ └── Dockerfile │ ├── tomcat8 │ └── Dockerfile │ └── tprov │ ├── .gitignore │ ├── Gemfile │ ├── Gemfile.lock │ ├── LICENSE │ ├── README.md │ ├── Rakefile │ ├── bin │ └── tprov │ ├── config.ru │ ├── lib │ ├── tprov.rb │ ├── tprov │ │ ├── app.rb │ │ ├── public │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── flash.css │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.js │ │ └── views │ │ │ ├── index.erb │ │ │ ├── instance_list.erb │ │ │ └── layout.erb │ └── version.rb │ ├── spec │ ├── spec_helper.rb │ └── tprov_spec.rb │ └── tprov.gemspec ├── 7 ├── composeapp │ ├── Dockerfile │ ├── LICENSE │ ├── README.md │ ├── app.py │ ├── docker-compose.yml │ └── requirements.txt ├── consul │ ├── Dockerfile │ ├── consul.json │ ├── consul │ │ ├── Dockerfile │ │ └── consul.json │ ├── distributed_app │ │ ├── Dockerfile │ │ ├── config.ru │ │ └── uwsgi-consul.ini │ └── distributed_client │ │ ├── Dockerfile │ │ └── client.rb └── tprov_api │ ├── .gitignore │ ├── Gemfile │ ├── Gemfile.lock │ ├── LICENSE │ ├── README.md │ ├── Rakefile │ ├── bin │ └── tprov │ ├── config.ru │ ├── lib │ ├── tprov.rb │ ├── tprov │ │ ├── app.rb │ │ ├── public │ │ │ ├── css │ │ │ │ ├── bootstrap-responsive.css │ │ │ │ ├── bootstrap-responsive.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── flash.css │ │ │ ├── img │ │ │ │ ├── glyphicons-halflings-white.png │ │ │ │ └── glyphicons-halflings.png │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── jquery.js │ │ └── views │ │ │ ├── index.erb │ │ │ ├── instance_list.erb │ │ │ └── layout.erb │ └── version.rb │ ├── spec │ ├── spec_helper.rb │ └── tprov_spec.rb │ └── tprov.gemspec └── 8 └── tprov_api ├── .gitignore ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md ├── Rakefile ├── bin ├── tprov └── trov-api ├── config.ru ├── lib ├── tprov-api.rb ├── tprov-api │ ├── app.rb │ ├── public │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── flash.css │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.js │ └── views │ │ ├── index.erb │ │ ├── instance_list.erb │ │ └── layout.erb ├── tprov.rb ├── tprov │ ├── app.rb │ ├── public │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── flash.css │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── jquery.js │ └── views │ │ ├── index.erb │ │ ├── instance_list.erb │ │ └── layout.erb └── version.rb ├── spec ├── spec_helper.rb └── tprov_spec.rb ├── tprov-api.gemspec └── tprov.gemspec /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .AppleDouble 3 | .LSOverride 4 | 5 | # Icon must end with two \r 6 | Icon 7 | 8 | 9 | # Thumbnails 10 | ._* 11 | 12 | # Files that might appear on external disk 13 | .Spotlight-V100 14 | .Trashes 15 | 16 | # Directories potentially created on remote AFP share 17 | .AppleDB 18 | .AppleDesktop 19 | Network Trash Folder 20 | Temporary Items 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Docker Book Code Repository 2 | 3 | Contains the code and configuration examples from [The Docker 4 | Book](http://www.dockerbook.com). 5 | 6 | ## Errata 7 | 8 | Email errata [here](mailto:james+dockererrata@lovedthanlost.net) 9 | 10 | -------------------------------------------------------------------------------- /code/4/Dockerfile_template: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | RUN apt-get -qq update 5 | -------------------------------------------------------------------------------- /code/4/apache2/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2013-07-28 4 | RUN apt-get update 5 | RUN apt-get install -y apache2 6 | ENV APACHE_RUN_USER www-data 7 | ENV APACHE_RUN_GROUP www-data 8 | ENV APACHE_LOG_DIR /var/log/apache2 9 | ENV APACHE_PID_FILE /var/run/apache2.pid 10 | ENV APACHE_RUN_DIR /var/run/apache2 11 | ENV APACHE_LOCK_DIR /var/lock/apache2 12 | ONBUILD ADD . /var/www/ 13 | EXPOSE 80 14 | ENTRYPOINT ["/usr/sbin/apachectl"] 15 | CMD ["-D", "FOREGROUND"] 16 | -------------------------------------------------------------------------------- /code/4/sshd/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | RUN apt-get update 5 | RUN apt-get install -y openssh-server 6 | RUN mkdir /var/run/sshd 7 | RUN echo "root:password" | chpasswd 8 | EXPOSE 22 9 | -------------------------------------------------------------------------------- /code/4/static_web/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | RUN apt-get update 4 | RUN apt-get install -y nginx 5 | RUN echo 'Hi, I am in your container' \ 6 | >/var/www/html/index.html 7 | EXPOSE 80 8 | -------------------------------------------------------------------------------- /code/4/webapp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jamtur01/apache2 2 | LABEL maintainer="james@example.com" 3 | ENV APPLICATION_NAME webapp 4 | ENV ENVIRONMENT development 5 | -------------------------------------------------------------------------------- /code/5/jenkins/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jenkins/jenkins:lts 2 | MAINTAINER james@example.com 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | USER root 6 | RUN apt-get -qq update && apt-get install -qq sudo 7 | RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers 8 | RUN wget http://get.docker.com/builds/Linux/x86_64/docker-latest.tgz 9 | RUN tar -xvzf docker-latest.tgz 10 | RUN mv docker/* /usr/bin/ 11 | 12 | USER jenkins 13 | RUN /usr/local/bin/install-plugins.sh junit git git-client ssh-slaves greenballs chucknorris ws-cleanup 14 | -------------------------------------------------------------------------------- /code/5/jenkins/dockerjenkins.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # First, make sure that cgroups are mounted correctly. 4 | CGROUP=/sys/fs/cgroup 5 | 6 | [ -d $CGROUP ] || 7 | mkdir $CGROUP 8 | 9 | mountpoint -q $CGROUP || 10 | mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup $CGROUP || { 11 | echo "Could not make a tmpfs mount. Did you use -privileged?" 12 | exit 1 13 | } 14 | 15 | # Mount the cgroup hierarchies exactly as they are in the parent system. 16 | for SUBSYS in $(cut -d: -f2 /proc/1/cgroup) 17 | do 18 | [ -d $CGROUP/$SUBSYS ] || mkdir $CGROUP/$SUBSYS 19 | mountpoint -q $CGROUP/$SUBSYS || 20 | mount -n -t cgroup -o $SUBSYS cgroup $CGROUP/$SUBSYS 21 | done 22 | 23 | # Now, close extraneous file descriptors. 24 | pushd /proc/self/fd 25 | for FD in * 26 | do 27 | case "$FD" in 28 | # Keep stdin/stdout/stderr 29 | [012]) 30 | ;; 31 | # Nuke everything else 32 | *) 33 | eval exec "$FD>&-" 34 | ;; 35 | esac 36 | done 37 | popd 38 | 39 | docker daemon & 40 | exec java -jar /opt/jenkins/jenkins.war 41 | -------------------------------------------------------------------------------- /code/5/jenkins/jenkins_multi_shell_step: -------------------------------------------------------------------------------- 1 | # Build the image to be used for this run. 2 | cd $OS && IMAGE=$(sudo docker build . | tail -1 | awk '{ print $NF }') 3 | 4 | # Build the directory to be mounted into Docker. 5 | 6 | MNT="$WORKSPACE/.." 7 | 8 | # Execute the build inside Docker. 9 | CONTAINER=$(sudo docker run -d -v "$MNT:/opt/project" $IMAGE /bin/bash -c "cd /opt/project/$OS && rake spec") 10 | 11 | # Attach to the container's streams so that we can see the output. 12 | sudo docker attach $CONTAINER 13 | 14 | # As soon as the process exits, get its return value. 15 | RC=$(sudo docker wait $CONTAINER) 16 | 17 | # Delete the container we've just used to free disk space. 18 | sudo docker rm $CONTAINER 19 | 20 | # Exit with the same value that the process exited with. 21 | exit $RC 22 | -------------------------------------------------------------------------------- /code/5/jenkins/jenkins_single_shell_step: -------------------------------------------------------------------------------- 1 | # Build the image to be used for this job. 2 | IMAGE=$(sudo docker build . | tail -1 | awk '{ print $NF }') 3 | 4 | # Build the directory to be mounted into Docker. 5 | MNT="$WORKSPACE/.." 6 | 7 | # Execute the build inside Docker. 8 | CONTAINER=$(sudo docker run -d -v $MNT:/opt/project/ $IMAGE /bin/bash -c 'cd /opt/project/workspace && rake spec') 9 | 10 | # Attach to the container so that we can see the output. 11 | sudo docker attach $CONTAINER 12 | 13 | # Get its exit code as soon as the container stops. 14 | RC=$(sudo docker wait $CONTAINER) 15 | 16 | # Delete the container we've just used. 17 | sudo docker rm $CONTAINER 18 | 19 | # Exit with the same value as that with which the process exited. 20 | exit $RC 21 | -------------------------------------------------------------------------------- /code/5/jenkins/plugins.txt: -------------------------------------------------------------------------------- 1 | structs 2 | ssh-credentials 3 | credentials 4 | junit 5 | script-security 6 | mailer 7 | workflow-scm-step 8 | workflow-step-api 9 | scm-api 10 | git 11 | matrix-project 12 | ssh-slaves 13 | chucknorris 14 | greenballs 15 | ws-cleanup 16 | git-client 17 | durable-task 18 | -------------------------------------------------------------------------------- /code/5/sample/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2014-06-01 4 | 5 | RUN apt-get -qq update && apt-get -qq install nginx 6 | 7 | RUN mkdir -p /var/www/html/website 8 | ADD nginx/global.conf /etc/nginx/conf.d/ 9 | ADD nginx/nginx.conf /etc/nginx/ 10 | 11 | EXPOSE 80 12 | -------------------------------------------------------------------------------- /code/5/sample/nginx/global.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 0.0.0.0:80; 3 | server_name _; 4 | 5 | root /var/www/html/website; 6 | index index.html index.htm; 7 | 8 | access_log /var/log/nginx/default_access.log; 9 | error_log /var/log/nginx/default_error.log; 10 | } 11 | -------------------------------------------------------------------------------- /code/5/sample/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes 4; 3 | pid /run/nginx.pid; 4 | daemon off; 5 | 6 | events { } 7 | 8 | http { 9 | sendfile on; 10 | tcp_nopush on; 11 | tcp_nodelay on; 12 | keepalive_timeout 65; 13 | types_hash_max_size 2048; 14 | include /etc/nginx/mime.types; 15 | default_type application/octet-stream; 16 | access_log /var/log/nginx/access.log; 17 | error_log /var/log/nginx/error.log; 18 | gzip on; 19 | gzip_disable "msie6"; 20 | include /etc/nginx/conf.d/*.conf; 21 | } 22 | -------------------------------------------------------------------------------- /code/5/sample/website/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test website 4 | 5 | 6 | 7 | 8 | 9 |

This is a test website

10 | 11 | 12 | -------------------------------------------------------------------------------- /code/5/sinatra/redis-cli/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2015-07-20 4 | 5 | RUN apt-get update 6 | RUN apt-get -y install redis-tools 7 | 8 | ENTRYPOINT ["/usr/bin/redis-cli"] 9 | CMD [] 10 | -------------------------------------------------------------------------------- /code/5/sinatra/redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2014-06-01 4 | 5 | RUN apt-get -qq update && apt-get -qq install redis-server redis-tools 6 | 7 | EXPOSE 6379 8 | 9 | ENTRYPOINT ["/usr/bin/redis-server" ] 10 | CMD [] 11 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2014-06-01 4 | 5 | RUN apt-get -qq update && apt-get -qq install ruby ruby-dev build-essential redis-tools 6 | RUN gem install --no-rdoc --no-ri sinatra json redis 7 | 8 | RUN mkdir -p /opt/webapp 9 | 10 | EXPOSE 4567 11 | 12 | CMD [ "/opt/webapp/bin/webapp" ] 13 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp/bin/webapp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) 4 | 5 | require 'app' 6 | 7 | App.run! 8 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp/lib/app.rb: -------------------------------------------------------------------------------- 1 | require "rubygems" 2 | require "sinatra" 3 | require "json" 4 | 5 | class App < Sinatra::Application 6 | 7 | set :bind, '0.0.0.0' 8 | 9 | get '/' do 10 | "

DockerBook Test Sinatra app

" 11 | end 12 | 13 | post '/json/?' do 14 | params.to_json 15 | end 16 | 17 | end 18 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp_redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2014-06-01 4 | 5 | RUN apt-get update && apt-get -y install ruby ruby-dev build-essential redis-tools 6 | RUN gem install --no-rdoc --no-ri sinatra json redis 7 | 8 | RUN mkdir -p /opt/webapp 9 | 10 | EXPOSE 4567 11 | 12 | CMD [ "/opt/webapp/bin/webapp" ] 13 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp_redis/bin/webapp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/ruby 2 | 3 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) 4 | 5 | require 'app' 6 | 7 | App.run! 8 | -------------------------------------------------------------------------------- /code/5/sinatra/webapp_redis/lib/app.rb: -------------------------------------------------------------------------------- 1 | require "rubygems" 2 | require "sinatra" 3 | require "json" 4 | require "redis" 5 | 6 | class App < Sinatra::Application 7 | 8 | redis = Redis.new(:host => 'db', :port => '6379') 9 | 10 | set :bind, '0.0.0.0' 11 | 12 | get '/' do 13 | "

DockerBook Test Redis-enabled Sinatra app

" 14 | end 15 | 16 | get '/json' do 17 | params = redis.get "params" 18 | params.to_json 19 | end 20 | 21 | post '/json/?' do 22 | redis.set "params", [params].to_json 23 | params.to_json 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /code/5/website/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2014-06-01 4 | 5 | RUN apt-get update 6 | RUN apt-get -y -q install nginx 7 | 8 | RUN mkdir -p /var/www/html/website 9 | ADD nginx/global.conf /etc/nginx/conf.d/ 10 | ADD nginx/nginx.conf /etc/nginx/ 11 | 12 | EXPOSE 80 13 | -------------------------------------------------------------------------------- /code/5/website/nginx/global.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 0.0.0.0:80; 3 | server_name _; 4 | 5 | root /var/www/html/website; 6 | index index.html index.htm; 7 | 8 | access_log /var/log/nginx/default_access.log; 9 | error_log /var/log/nginx/default_error.log; 10 | } 11 | -------------------------------------------------------------------------------- /code/5/website/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user www-data; 2 | worker_processes 4; 3 | pid /run/nginx.pid; 4 | daemon off; 5 | 6 | events { } 7 | 8 | http { 9 | sendfile on; 10 | tcp_nopush on; 11 | tcp_nodelay on; 12 | keepalive_timeout 65; 13 | types_hash_max_size 2048; 14 | include /etc/nginx/mime.types; 15 | default_type application/octet-stream; 16 | access_log /var/log/nginx/access.log; 17 | error_log /var/log/nginx/error.log; 18 | gzip on; 19 | gzip_disable "msie6"; 20 | include /etc/nginx/conf.d/*.conf; 21 | } 22 | -------------------------------------------------------------------------------- /code/5/website/website/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test website 4 | 5 | 6 | 7 | 8 | 9 |

This is a test website

10 | 11 | 12 | -------------------------------------------------------------------------------- /code/6/jekyll/apache/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | 4 | RUN apt-get -qq update 5 | RUN apt-get -qq install apache2 6 | 7 | VOLUME [ "/var/www/html" ] 8 | WORKDIR /var/www/html 9 | 10 | ENV APACHE_RUN_USER www-data 11 | ENV APACHE_RUN_GROUP www-data 12 | ENV APACHE_LOG_DIR /var/log/apache2 13 | ENV APACHE_PID_FILE /var/run/apache2.pid 14 | ENV APACHE_RUN_DIR /var/run/apache2 15 | ENV APACHE_LOCK_DIR /var/lock/apache2 16 | 17 | RUN mkdir -p $APACHE_RUN_DIR $APACHE_LOCK_DIR $APACHE_LOG_DIR 18 | 19 | EXPOSE 80 20 | 21 | ENTRYPOINT [ "/usr/sbin/apachectl" ] 22 | CMD ["-D", "FOREGROUND"] 23 | -------------------------------------------------------------------------------- /code/6/jekyll/jekyll/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get -qq install ruby ruby-dev libffi-dev build-essential nodejs 7 | RUN gem install --no-rdoc --no-ri jekyll -v 2.5.3 8 | 9 | VOLUME /data 10 | VOLUME /var/www/html 11 | WORKDIR /data 12 | 13 | ENTRYPOINT [ "jekyll", "build", "--destination=/var/www/html" ] 14 | -------------------------------------------------------------------------------- /code/6/node/logstash/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get -qq install wget gnupg2 openjdk-8-jdk 7 | RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - 8 | RUN echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list 9 | RUN apt-get -qq update 10 | RUN apt-get -qq install logstash 11 | 12 | WORKDIR /usr/share/logstash 13 | 14 | ADD logstash.conf /usr/share/logstash/ 15 | 16 | ENTRYPOINT [ "bin/logstash" ] 17 | CMD [ "-f", "logstash.conf", "--config.reload.automatic" ] 18 | -------------------------------------------------------------------------------- /code/6/node/logstash/logstash.conf: -------------------------------------------------------------------------------- 1 | input { 2 | file { 3 | type => "syslog" 4 | path => ["/var/log/nodeapp/nodeapp.log", "/var/log/redis/redis-server.log"] 5 | } 6 | } 7 | output { 8 | stdout { 9 | codec => rubydebug 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /code/6/node/nodejs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get -qq install nodejs npm 7 | RUN mkdir -p /var/log/nodeapp 8 | 9 | ADD nodeapp /opt/nodeapp/ 10 | 11 | WORKDIR /opt/nodeapp 12 | RUN npm install 13 | 14 | VOLUME [ "/var/log/nodeapp" ] 15 | 16 | EXPOSE 3000 17 | 18 | ENTRYPOINT [ "nodejs", "server.js" ] 19 | -------------------------------------------------------------------------------- /code/6/node/nodejs/nodeapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docker-dev", 3 | "version": "0.1.1", 4 | "description": "Docker Dev", 5 | "dependencies": { 6 | "connect-redis": "~3.4.0", 7 | "express": ">=3.11.0", 8 | "express-session": "~1.15.6", 9 | "cookie-parser": "~1.4.3", 10 | "morgan": "~1.9.1", 11 | "hiredis": "~0.5.0", 12 | "redis": "~0.10.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /code/6/node/nodejs/nodeapp/server.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var express = require('express'), 3 | session = require('express-session') 4 | cookieParser = require('cookie-parser') 5 | morgan = require('morgan') 6 | app = express(), 7 | redis = require('redis'), 8 | RedisStore = require('connect-redis')(session), 9 | server = require('http').createServer(app); 10 | 11 | var logFile = fs.createWriteStream('/var/log/nodeapp/nodeapp.log', {flags: 'a'}); 12 | 13 | app.use(morgan('combined', {stream: logFile})); 14 | app.use(cookieParser('keyboard-cat')); 15 | app.use(session({ 16 | resave: false, 17 | saveUninitialized: false, 18 | store: new RedisStore({ 19 | host: process.env.REDIS_HOST || 'redis_primary', 20 | port: process.env.REDIS_PORT || 6379, 21 | db: process.env.REDIS_DB || 0 22 | }), 23 | secret: 'keyboard cat', 24 | cookie: { 25 | expires: false, 26 | maxAge: 30 * 24 * 60 * 60 * 1000 27 | } 28 | })); 29 | 30 | app.get('/', function(req, res) { 31 | res.json({ 32 | status: "ok" 33 | }); 34 | }); 35 | 36 | app.get('/hello/:name', function(req, res) { 37 | res.json({ 38 | hello: req.params.name 39 | }); 40 | }); 41 | 42 | var port = process.env.HTTP_PORT || 3000; 43 | server.listen(port); 44 | console.log('Listening on port ' + port); 45 | -------------------------------------------------------------------------------- /code/6/node/redis_base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2017-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get install -qq software-properties-common 7 | RUN add-apt-repository ppa:chris-lea/redis-server 8 | RUN apt-get -qq update 9 | RUN apt-get -qq install redis-server redis-tools 10 | 11 | VOLUME [ "/var/lib/redis", "/var/log/redis" ] 12 | 13 | EXPOSE 6379 14 | 15 | CMD [] 16 | -------------------------------------------------------------------------------- /code/6/node/redis_primary/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jamtur01/redis 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | ENTRYPOINT [ "redis-server", "--protected-mode no", "--logfile /var/log/redis/redis-server.log" ] 6 | -------------------------------------------------------------------------------- /code/6/node/redis_replica/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jamtur01/redis 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | ENTRYPOINT [ "redis-server", "--protected-mode no", "--logfile /var/log/redis/redis-replica.log", "--slaveof redis_primary 6379" ] 6 | -------------------------------------------------------------------------------- /code/6/tomcat/fetcher/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get -qq install wget 7 | 8 | VOLUME [ "/var/lib/tomcat8/webapps/" ] 9 | WORKDIR /var/lib/tomcat8/webapps/ 10 | 11 | ENTRYPOINT [ "wget" ] 12 | CMD [ "--help" ] 13 | -------------------------------------------------------------------------------- /code/6/tomcat/tomcat8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | LABEL maintainer="james@example.com" 3 | ENV REFRESHED_AT 2016-06-01 4 | 5 | RUN apt-get -qq update 6 | RUN apt-get -qq install tomcat8 default-jdk 7 | 8 | ENV CATALINA_HOME /usr/share/tomcat8 9 | ENV CATALINA_BASE /var/lib/tomcat8 10 | ENV CATALINA_PID /var/run/tomcat8.pid 11 | ENV CATALINA_SH /usr/share/tomcat8/bin/catalina.sh 12 | ENV CATALINA_TMPDIR /tmp/tomcat8-tomcat8-tmp 13 | 14 | RUN mkdir -p $CATALINA_TMPDIR 15 | 16 | VOLUME [ "/var/lib/tomcat8/webapps/" ] 17 | 18 | EXPOSE 8080 19 | 20 | ENTRYPOINT [ "/usr/share/tomcat8/bin/catalina.sh", "run" ] 21 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/.gitignore: -------------------------------------------------------------------------------- 1 | pkg/* 2 | *.gem 3 | .bundle 4 | db/statum.db 5 | config/config.yml 6 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/Gemfile: -------------------------------------------------------------------------------- 1 | source "http://rubygems.org" 2 | gem "sinatra" 3 | gem "sinatra-static-assets" 4 | gem "emk-sinatra-url-for" 5 | gem "sinatra-flash" 6 | gem "sinatra-redirect-with-flash" 7 | #gem "docker-api", :require => "docker" 8 | gem "redis" 9 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: http://rubygems.org/ 3 | specs: 4 | emk-sinatra-url-for (0.2.1) 5 | sinatra (>= 0.9.1.1) 6 | mustermann (1.0.3) 7 | rack (2.2.3) 8 | rack-protection (2.0.5) 9 | rack 10 | redis (4.1.1) 11 | sinatra (2.0.5) 12 | mustermann (~> 1.0) 13 | rack (~> 2.0) 14 | rack-protection (= 2.0.5) 15 | tilt (~> 2.0) 16 | sinatra-flash (0.3.0) 17 | sinatra (>= 1.0.0) 18 | sinatra-redirect-with-flash (0.2.1) 19 | sinatra (>= 1.0.0) 20 | sinatra-static-assets (1.0.4) 21 | sinatra (>= 1.1.0) 22 | tilt (2.0.9) 23 | 24 | PLATFORMS 25 | ruby 26 | 27 | DEPENDENCIES 28 | emk-sinatra-url-for 29 | redis 30 | sinatra 31 | sinatra-flash 32 | sinatra-redirect-with-flash 33 | sinatra-static-assets 34 | 35 | BUNDLED WITH 36 | 1.17.2 37 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 James Turnbull, james@lovedthanlost.net 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/README.md: -------------------------------------------------------------------------------- 1 | # TProv 2 | 3 | **TProv** or the Tomcat Provisioner is a 4 | [Sinatra](http://www.sinatrarb.com) app that demonstrates how to build 5 | a simple PAAS with Docker. It allows you to provision Tomcat 6 | applications running in Docker containers. 7 | 8 | ## Running standalone 9 | 10 | Simply run the ``bundle`` and then ``rackup`` commands. 11 | 12 | ## Bundling as a gem 13 | 14 | gem build tprov.gemspec 15 | sudo gem install tprov-0.0.1.gem 16 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/Rakefile: -------------------------------------------------------------------------------- 1 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "lib"))) 2 | 3 | require 'rubygems' 4 | require 'rspec/core/rake_task' 5 | require 'bundler/gem_tasks' 6 | require 'rubygems' 7 | require 'sinatra' 8 | require 'tprov' 9 | 10 | task :default => :help 11 | 12 | desc "Run specs" 13 | task :spec do 14 | RSpec::Core::RakeTask.new(:spec) do |t| 15 | t.pattern = './spec/**/*_spec.rb' 16 | end 17 | end 18 | 19 | desc "Run IRB console with app environment" 20 | task :console do 21 | puts "Loading development console..." 22 | system("irb -r ./lib/wprov.rb") 23 | end 24 | 25 | desc "Show help menu" 26 | task :help do 27 | puts "Available rake tasks: " 28 | puts "rake console - Run a IRB console with all enviroment loaded" 29 | puts "rake spec - Run specs and calculate coverage" 30 | end 31 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/bin/tprov: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib"))) 4 | 5 | require "rubygems" 6 | require "optparse" 7 | require "tprov" 8 | require "version" 9 | 10 | options = {} 11 | 12 | optparse = OptionParser.new do |opts| 13 | # Set a banner, displayed at the top 14 | # of the help screen. 15 | opts.banner = "Usage: TProv [options] ..." 16 | 17 | opts.separator '' 18 | opts.separator "Configuration options:" 19 | 20 | opts.on_tail( "-v", "--version", "Show version") do 21 | puts "WProv version #{TProv::VERSION}" 22 | exit 23 | end 24 | 25 | opts.separator "" 26 | opts.separator "Common options:" 27 | 28 | opts.on_tail("-h", "--help", "Display this screen" ) do 29 | puts opts 30 | exit 31 | end 32 | end 33 | 34 | begin 35 | optparse.parse! 36 | TProv::Application.run! 37 | rescue OptionParser::InvalidArgument, OptionParser::InvalidOption, OptionParser::MissingArgument 38 | puts $!.to_s 39 | puts optparse 40 | exit 41 | end 42 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/config.ru: -------------------------------------------------------------------------------- 1 | $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "lib"))) 2 | 3 | require 'rubygems' 4 | require 'tprov' 5 | 6 | run TProv::Application 7 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov.rb: -------------------------------------------------------------------------------- 1 | require "version" 2 | require "tprov/app" 3 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/app.rb: -------------------------------------------------------------------------------- 1 | $: << File.dirname(__FILE__) 2 | 3 | require 'sinatra' 4 | require 'sinatra/url_for' 5 | require 'sinatra/static_assets' 6 | require 'sinatra/flash' 7 | require 'sinatra/redirect_with_flash' 8 | require 'json' 9 | require 'uri' 10 | 11 | module TProv 12 | class Application < Sinatra::Base 13 | 14 | register Sinatra::StaticAssets 15 | register Sinatra::Flash 16 | helpers Sinatra::RedirectWithFlash 17 | 18 | set :public_folder, File.join(File.dirname(__FILE__), 'public') 19 | set :views, File.join(File.dirname(__FILE__), 'views') 20 | set :bind, '0.0.0.0' 21 | 22 | enable :sessions, :logging, :dump_errors, :raise_errors, :show_exceptions 23 | 24 | before do 25 | @app_name = "TProv" 26 | end 27 | 28 | get '/' do 29 | erb :index 30 | end 31 | 32 | post '/tomcat/create' do 33 | if params[:name].empty? or params[:url].empty? 34 | redirect '/', :error => "You must specify a name and a URL." 35 | end 36 | success, output = get_war(params[:name], params[:url]) 37 | unless success 38 | redirect '/', :error => "Tomcat application #{params[:name]} failed to be fetched because #{output}." 39 | end 40 | success, output = create_instance(params[:name]) 41 | unless success 42 | redirect '/', :error => "Tomcat application #{params[:name]} failed to be created because #{output}." 43 | end 44 | redirect '/', :success => "Tomcat Application #{params[:name]} created!" 45 | end 46 | 47 | post '/tomcat/delete' do 48 | success, output = delete_instance(params[:id]) 49 | unless success 50 | redirect '/', :error => "Tomcat application #{params[:name]} failed to be deleted because #{output}." 51 | end 52 | redirect '/', :success => "Instance #{params[:id]} deleted!" 53 | end 54 | 55 | get '/tomcat/list' do 56 | @instances = list_instances 57 | erb :instance_list 58 | end 59 | 60 | helpers do 61 | def get_war(name, url) 62 | cid = `docker run --name "#{name}" jamtur01/fetcher "#{url}" 2>&1`.chop 63 | puts cid 64 | [$?.exitstatus == 0, cid] 65 | end 66 | 67 | def create_instance(name) 68 | cid = `docker run -P --volumes-from "#{name}" -d -t jamtur01/tomcat8 2>&1`.chop 69 | [$?.exitstatus == 0, cid] 70 | end 71 | 72 | def delete_instance(cid) 73 | kill = `docker kill #{cid} 2>&1` 74 | [$?.exitstatus == 0, kill] 75 | end 76 | 77 | def list_instances 78 | @list = {} 79 | instance_ids = `docker ps -q`.split(/\n/).reject(&:empty?) 80 | instance_ids.each { |id| 81 | port = `docker port #{id} 8080`.chop 82 | config = JSON.parse(`docker inspect #{id}`) 83 | @list[id] = { 'hostname' => config[0]["Config"]["Hostname"], 'ip' => config[0]["NetworkSettings"]["IPAddress"], 'port' => port } 84 | } 85 | @list 86 | end 87 | end 88 | 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/public/css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.4 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | .clearfix { 12 | *zoom: 1; 13 | } 14 | 15 | .clearfix:before, 16 | .clearfix:after { 17 | display: table; 18 | content: ""; 19 | } 20 | 21 | .clearfix:after { 22 | clear: both; 23 | } 24 | 25 | .hide-text { 26 | font: 0/0 a; 27 | color: transparent; 28 | text-shadow: none; 29 | background-color: transparent; 30 | border: 0; 31 | } 32 | 33 | .input-block-level { 34 | display: block; 35 | width: 100%; 36 | min-height: 28px; 37 | -webkit-box-sizing: border-box; 38 | -moz-box-sizing: border-box; 39 | -ms-box-sizing: border-box; 40 | box-sizing: border-box; 41 | } 42 | 43 | .hidden { 44 | display: none; 45 | visibility: hidden; 46 | } 47 | 48 | .visible-phone { 49 | display: none !important; 50 | } 51 | 52 | .visible-tablet { 53 | display: none !important; 54 | } 55 | 56 | .hidden-desktop { 57 | display: none !important; 58 | } 59 | 60 | @media (max-width: 767px) { 61 | .visible-phone { 62 | display: inherit !important; 63 | } 64 | .hidden-phone { 65 | display: none !important; 66 | } 67 | .hidden-desktop { 68 | display: inherit !important; 69 | } 70 | .visible-desktop { 71 | display: none !important; 72 | } 73 | } 74 | 75 | @media (min-width: 768px) and (max-width: 979px) { 76 | .visible-tablet { 77 | display: inherit !important; 78 | } 79 | .hidden-tablet { 80 | display: none !important; 81 | } 82 | .hidden-desktop { 83 | display: inherit !important; 84 | } 85 | .visible-desktop { 86 | display: none !important ; 87 | } 88 | } 89 | 90 | @media (max-width: 480px) { 91 | .nav-collapse { 92 | -webkit-transform: translate3d(0, 0, 0); 93 | } 94 | .page-header h1 small { 95 | display: block; 96 | line-height: 18px; 97 | } 98 | input[type="checkbox"], 99 | input[type="radio"] { 100 | border: 1px solid #ccc; 101 | } 102 | .form-horizontal .control-group > label { 103 | float: none; 104 | width: auto; 105 | padding-top: 0; 106 | text-align: left; 107 | } 108 | .form-horizontal .controls { 109 | margin-left: 0; 110 | } 111 | .form-horizontal .control-list { 112 | padding-top: 0; 113 | } 114 | .form-horizontal .form-actions { 115 | padding-right: 10px; 116 | padding-left: 10px; 117 | } 118 | .modal { 119 | position: absolute; 120 | top: 10px; 121 | right: 10px; 122 | left: 10px; 123 | width: auto; 124 | margin: 0; 125 | } 126 | .modal.fade.in { 127 | top: auto; 128 | } 129 | .modal-header .close { 130 | padding: 10px; 131 | margin: -10px; 132 | } 133 | .carousel-caption { 134 | position: static; 135 | } 136 | } 137 | 138 | @media (max-width: 767px) { 139 | body { 140 | padding-right: 20px; 141 | padding-left: 20px; 142 | } 143 | .navbar-fixed-top, 144 | .navbar-fixed-bottom { 145 | margin-right: -20px; 146 | margin-left: -20px; 147 | } 148 | .container-fluid { 149 | padding: 0; 150 | } 151 | .dl-horizontal dt { 152 | float: none; 153 | width: auto; 154 | clear: none; 155 | text-align: left; 156 | } 157 | .dl-horizontal dd { 158 | margin-left: 0; 159 | } 160 | .container { 161 | width: auto; 162 | } 163 | .row-fluid { 164 | width: 100%; 165 | } 166 | .row, 167 | .thumbnails { 168 | margin-left: 0; 169 | } 170 | [class*="span"], 171 | .row-fluid [class*="span"] { 172 | display: block; 173 | float: none; 174 | width: auto; 175 | margin-left: 0; 176 | } 177 | .input-large, 178 | .input-xlarge, 179 | .input-xxlarge, 180 | input[class*="span"], 181 | select[class*="span"], 182 | textarea[class*="span"], 183 | .uneditable-input { 184 | display: block; 185 | width: 100%; 186 | min-height: 28px; 187 | -webkit-box-sizing: border-box; 188 | -moz-box-sizing: border-box; 189 | -ms-box-sizing: border-box; 190 | box-sizing: border-box; 191 | } 192 | .input-prepend input, 193 | .input-append input, 194 | .input-prepend input[class*="span"], 195 | .input-append input[class*="span"] { 196 | display: inline-block; 197 | width: auto; 198 | } 199 | } 200 | 201 | @media (min-width: 768px) and (max-width: 979px) { 202 | .row { 203 | margin-left: -20px; 204 | *zoom: 1; 205 | } 206 | .row:before, 207 | .row:after { 208 | display: table; 209 | content: ""; 210 | } 211 | .row:after { 212 | clear: both; 213 | } 214 | [class*="span"] { 215 | float: left; 216 | margin-left: 20px; 217 | } 218 | .container, 219 | .navbar-fixed-top .container, 220 | .navbar-fixed-bottom .container { 221 | width: 724px; 222 | } 223 | .span12 { 224 | width: 724px; 225 | } 226 | .span11 { 227 | width: 662px; 228 | } 229 | .span10 { 230 | width: 600px; 231 | } 232 | .span9 { 233 | width: 538px; 234 | } 235 | .span8 { 236 | width: 476px; 237 | } 238 | .span7 { 239 | width: 414px; 240 | } 241 | .span6 { 242 | width: 352px; 243 | } 244 | .span5 { 245 | width: 290px; 246 | } 247 | .span4 { 248 | width: 228px; 249 | } 250 | .span3 { 251 | width: 166px; 252 | } 253 | .span2 { 254 | width: 104px; 255 | } 256 | .span1 { 257 | width: 42px; 258 | } 259 | .offset12 { 260 | margin-left: 764px; 261 | } 262 | .offset11 { 263 | margin-left: 702px; 264 | } 265 | .offset10 { 266 | margin-left: 640px; 267 | } 268 | .offset9 { 269 | margin-left: 578px; 270 | } 271 | .offset8 { 272 | margin-left: 516px; 273 | } 274 | .offset7 { 275 | margin-left: 454px; 276 | } 277 | .offset6 { 278 | margin-left: 392px; 279 | } 280 | .offset5 { 281 | margin-left: 330px; 282 | } 283 | .offset4 { 284 | margin-left: 268px; 285 | } 286 | .offset3 { 287 | margin-left: 206px; 288 | } 289 | .offset2 { 290 | margin-left: 144px; 291 | } 292 | .offset1 { 293 | margin-left: 82px; 294 | } 295 | .row-fluid { 296 | width: 100%; 297 | *zoom: 1; 298 | } 299 | .row-fluid:before, 300 | .row-fluid:after { 301 | display: table; 302 | content: ""; 303 | } 304 | .row-fluid:after { 305 | clear: both; 306 | } 307 | .row-fluid [class*="span"] { 308 | display: block; 309 | float: left; 310 | width: 100%; 311 | min-height: 28px; 312 | margin-left: 2.762430939%; 313 | *margin-left: 2.709239449638298%; 314 | -webkit-box-sizing: border-box; 315 | -moz-box-sizing: border-box; 316 | -ms-box-sizing: border-box; 317 | box-sizing: border-box; 318 | } 319 | .row-fluid [class*="span"]:first-child { 320 | margin-left: 0; 321 | } 322 | .row-fluid .span12 { 323 | width: 99.999999993%; 324 | *width: 99.9468085036383%; 325 | } 326 | .row-fluid .span11 { 327 | width: 91.436464082%; 328 | *width: 91.38327259263829%; 329 | } 330 | .row-fluid .span10 { 331 | width: 82.87292817100001%; 332 | *width: 82.8197366816383%; 333 | } 334 | .row-fluid .span9 { 335 | width: 74.30939226%; 336 | *width: 74.25620077063829%; 337 | } 338 | .row-fluid .span8 { 339 | width: 65.74585634900001%; 340 | *width: 65.6926648596383%; 341 | } 342 | .row-fluid .span7 { 343 | width: 57.182320438000005%; 344 | *width: 57.129128948638304%; 345 | } 346 | .row-fluid .span6 { 347 | width: 48.618784527%; 348 | *width: 48.5655930376383%; 349 | } 350 | .row-fluid .span5 { 351 | width: 40.055248616%; 352 | *width: 40.0020571266383%; 353 | } 354 | .row-fluid .span4 { 355 | width: 31.491712705%; 356 | *width: 31.4385212156383%; 357 | } 358 | .row-fluid .span3 { 359 | width: 22.928176794%; 360 | *width: 22.874985304638297%; 361 | } 362 | .row-fluid .span2 { 363 | width: 14.364640883%; 364 | *width: 14.311449393638298%; 365 | } 366 | .row-fluid .span1 { 367 | width: 5.801104972%; 368 | *width: 5.747913482638298%; 369 | } 370 | input, 371 | textarea, 372 | .uneditable-input { 373 | margin-left: 0; 374 | } 375 | input.span12, 376 | textarea.span12, 377 | .uneditable-input.span12 { 378 | width: 714px; 379 | } 380 | input.span11, 381 | textarea.span11, 382 | .uneditable-input.span11 { 383 | width: 652px; 384 | } 385 | input.span10, 386 | textarea.span10, 387 | .uneditable-input.span10 { 388 | width: 590px; 389 | } 390 | input.span9, 391 | textarea.span9, 392 | .uneditable-input.span9 { 393 | width: 528px; 394 | } 395 | input.span8, 396 | textarea.span8, 397 | .uneditable-input.span8 { 398 | width: 466px; 399 | } 400 | input.span7, 401 | textarea.span7, 402 | .uneditable-input.span7 { 403 | width: 404px; 404 | } 405 | input.span6, 406 | textarea.span6, 407 | .uneditable-input.span6 { 408 | width: 342px; 409 | } 410 | input.span5, 411 | textarea.span5, 412 | .uneditable-input.span5 { 413 | width: 280px; 414 | } 415 | input.span4, 416 | textarea.span4, 417 | .uneditable-input.span4 { 418 | width: 218px; 419 | } 420 | input.span3, 421 | textarea.span3, 422 | .uneditable-input.span3 { 423 | width: 156px; 424 | } 425 | input.span2, 426 | textarea.span2, 427 | .uneditable-input.span2 { 428 | width: 94px; 429 | } 430 | input.span1, 431 | textarea.span1, 432 | .uneditable-input.span1 { 433 | width: 32px; 434 | } 435 | } 436 | 437 | @media (min-width: 1200px) { 438 | .row { 439 | margin-left: -30px; 440 | *zoom: 1; 441 | } 442 | .row:before, 443 | .row:after { 444 | display: table; 445 | content: ""; 446 | } 447 | .row:after { 448 | clear: both; 449 | } 450 | [class*="span"] { 451 | float: left; 452 | margin-left: 30px; 453 | } 454 | .container, 455 | .navbar-fixed-top .container, 456 | .navbar-fixed-bottom .container { 457 | width: 1170px; 458 | } 459 | .span12 { 460 | width: 1170px; 461 | } 462 | .span11 { 463 | width: 1070px; 464 | } 465 | .span10 { 466 | width: 970px; 467 | } 468 | .span9 { 469 | width: 870px; 470 | } 471 | .span8 { 472 | width: 770px; 473 | } 474 | .span7 { 475 | width: 670px; 476 | } 477 | .span6 { 478 | width: 570px; 479 | } 480 | .span5 { 481 | width: 470px; 482 | } 483 | .span4 { 484 | width: 370px; 485 | } 486 | .span3 { 487 | width: 270px; 488 | } 489 | .span2 { 490 | width: 170px; 491 | } 492 | .span1 { 493 | width: 70px; 494 | } 495 | .offset12 { 496 | margin-left: 1230px; 497 | } 498 | .offset11 { 499 | margin-left: 1130px; 500 | } 501 | .offset10 { 502 | margin-left: 1030px; 503 | } 504 | .offset9 { 505 | margin-left: 930px; 506 | } 507 | .offset8 { 508 | margin-left: 830px; 509 | } 510 | .offset7 { 511 | margin-left: 730px; 512 | } 513 | .offset6 { 514 | margin-left: 630px; 515 | } 516 | .offset5 { 517 | margin-left: 530px; 518 | } 519 | .offset4 { 520 | margin-left: 430px; 521 | } 522 | .offset3 { 523 | margin-left: 330px; 524 | } 525 | .offset2 { 526 | margin-left: 230px; 527 | } 528 | .offset1 { 529 | margin-left: 130px; 530 | } 531 | .row-fluid { 532 | width: 100%; 533 | *zoom: 1; 534 | } 535 | .row-fluid:before, 536 | .row-fluid:after { 537 | display: table; 538 | content: ""; 539 | } 540 | .row-fluid:after { 541 | clear: both; 542 | } 543 | .row-fluid [class*="span"] { 544 | display: block; 545 | float: left; 546 | width: 100%; 547 | min-height: 28px; 548 | margin-left: 2.564102564%; 549 | *margin-left: 2.510911074638298%; 550 | -webkit-box-sizing: border-box; 551 | -moz-box-sizing: border-box; 552 | -ms-box-sizing: border-box; 553 | box-sizing: border-box; 554 | } 555 | .row-fluid [class*="span"]:first-child { 556 | margin-left: 0; 557 | } 558 | .row-fluid .span12 { 559 | width: 100%; 560 | *width: 99.94680851063829%; 561 | } 562 | .row-fluid .span11 { 563 | width: 91.45299145300001%; 564 | *width: 91.3997999636383%; 565 | } 566 | .row-fluid .span10 { 567 | width: 82.905982906%; 568 | *width: 82.8527914166383%; 569 | } 570 | .row-fluid .span9 { 571 | width: 74.358974359%; 572 | *width: 74.30578286963829%; 573 | } 574 | .row-fluid .span8 { 575 | width: 65.81196581200001%; 576 | *width: 65.7587743226383%; 577 | } 578 | .row-fluid .span7 { 579 | width: 57.264957265%; 580 | *width: 57.2117657756383%; 581 | } 582 | .row-fluid .span6 { 583 | width: 48.717948718%; 584 | *width: 48.6647572286383%; 585 | } 586 | .row-fluid .span5 { 587 | width: 40.170940171000005%; 588 | *width: 40.117748681638304%; 589 | } 590 | .row-fluid .span4 { 591 | width: 31.623931624%; 592 | *width: 31.5707401346383%; 593 | } 594 | .row-fluid .span3 { 595 | width: 23.076923077%; 596 | *width: 23.0237315876383%; 597 | } 598 | .row-fluid .span2 { 599 | width: 14.529914530000001%; 600 | *width: 14.4767230406383%; 601 | } 602 | .row-fluid .span1 { 603 | width: 5.982905983%; 604 | *width: 5.929714493638298%; 605 | } 606 | input, 607 | textarea, 608 | .uneditable-input { 609 | margin-left: 0; 610 | } 611 | input.span12, 612 | textarea.span12, 613 | .uneditable-input.span12 { 614 | width: 1160px; 615 | } 616 | input.span11, 617 | textarea.span11, 618 | .uneditable-input.span11 { 619 | width: 1060px; 620 | } 621 | input.span10, 622 | textarea.span10, 623 | .uneditable-input.span10 { 624 | width: 960px; 625 | } 626 | input.span9, 627 | textarea.span9, 628 | .uneditable-input.span9 { 629 | width: 860px; 630 | } 631 | input.span8, 632 | textarea.span8, 633 | .uneditable-input.span8 { 634 | width: 760px; 635 | } 636 | input.span7, 637 | textarea.span7, 638 | .uneditable-input.span7 { 639 | width: 660px; 640 | } 641 | input.span6, 642 | textarea.span6, 643 | .uneditable-input.span6 { 644 | width: 560px; 645 | } 646 | input.span5, 647 | textarea.span5, 648 | .uneditable-input.span5 { 649 | width: 460px; 650 | } 651 | input.span4, 652 | textarea.span4, 653 | .uneditable-input.span4 { 654 | width: 360px; 655 | } 656 | input.span3, 657 | textarea.span3, 658 | .uneditable-input.span3 { 659 | width: 260px; 660 | } 661 | input.span2, 662 | textarea.span2, 663 | .uneditable-input.span2 { 664 | width: 160px; 665 | } 666 | input.span1, 667 | textarea.span1, 668 | .uneditable-input.span1 { 669 | width: 60px; 670 | } 671 | .thumbnails { 672 | margin-left: -30px; 673 | } 674 | .thumbnails > li { 675 | margin-left: 30px; 676 | } 677 | .row-fluid .thumbnails { 678 | margin-left: 0; 679 | } 680 | } 681 | 682 | @media (max-width: 979px) { 683 | body { 684 | padding-top: 0; 685 | } 686 | .navbar-fixed-top, 687 | .navbar-fixed-bottom { 688 | position: static; 689 | } 690 | .navbar-fixed-top { 691 | margin-bottom: 18px; 692 | } 693 | .navbar-fixed-bottom { 694 | margin-top: 18px; 695 | } 696 | .navbar-fixed-top .navbar-inner, 697 | .navbar-fixed-bottom .navbar-inner { 698 | padding: 5px; 699 | } 700 | .navbar .container { 701 | width: auto; 702 | padding: 0; 703 | } 704 | .navbar .brand { 705 | padding-right: 10px; 706 | padding-left: 10px; 707 | margin: 0 0 0 -5px; 708 | } 709 | .nav-collapse { 710 | clear: both; 711 | } 712 | .nav-collapse .nav { 713 | float: none; 714 | margin: 0 0 9px; 715 | } 716 | .nav-collapse .nav > li { 717 | float: none; 718 | } 719 | .nav-collapse .nav > li > a { 720 | margin-bottom: 2px; 721 | } 722 | .nav-collapse .nav > .divider-vertical { 723 | display: none; 724 | } 725 | .nav-collapse .nav .nav-header { 726 | color: #999999; 727 | text-shadow: none; 728 | } 729 | .nav-collapse .nav > li > a, 730 | .nav-collapse .dropdown-menu a { 731 | padding: 6px 15px; 732 | font-weight: bold; 733 | color: #999999; 734 | -webkit-border-radius: 3px; 735 | -moz-border-radius: 3px; 736 | border-radius: 3px; 737 | } 738 | .nav-collapse .btn { 739 | padding: 4px 10px 4px; 740 | font-weight: normal; 741 | -webkit-border-radius: 4px; 742 | -moz-border-radius: 4px; 743 | border-radius: 4px; 744 | } 745 | .nav-collapse .dropdown-menu li + li a { 746 | margin-bottom: 2px; 747 | } 748 | .nav-collapse .nav > li > a:hover, 749 | .nav-collapse .dropdown-menu a:hover { 750 | background-color: #222222; 751 | } 752 | .nav-collapse.in .btn-group { 753 | padding: 0; 754 | margin-top: 5px; 755 | } 756 | .nav-collapse .dropdown-menu { 757 | position: static; 758 | top: auto; 759 | left: auto; 760 | display: block; 761 | float: none; 762 | max-width: none; 763 | padding: 0; 764 | margin: 0 15px; 765 | background-color: transparent; 766 | border: none; 767 | -webkit-border-radius: 0; 768 | -moz-border-radius: 0; 769 | border-radius: 0; 770 | -webkit-box-shadow: none; 771 | -moz-box-shadow: none; 772 | box-shadow: none; 773 | } 774 | .nav-collapse .dropdown-menu:before, 775 | .nav-collapse .dropdown-menu:after { 776 | display: none; 777 | } 778 | .nav-collapse .dropdown-menu .divider { 779 | display: none; 780 | } 781 | .nav-collapse .navbar-form, 782 | .nav-collapse .navbar-search { 783 | float: none; 784 | padding: 9px 15px; 785 | margin: 9px 0; 786 | border-top: 1px solid #222222; 787 | border-bottom: 1px solid #222222; 788 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 789 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 790 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 791 | } 792 | .navbar .nav-collapse .nav.pull-right { 793 | float: none; 794 | margin-left: 0; 795 | } 796 | .nav-collapse, 797 | .nav-collapse.collapse { 798 | height: 0; 799 | overflow: hidden; 800 | } 801 | .navbar .btn-navbar { 802 | display: block; 803 | } 804 | .navbar-static .navbar-inner { 805 | padding-right: 10px; 806 | padding-left: 10px; 807 | } 808 | } 809 | 810 | @media (min-width: 980px) { 811 | .nav-collapse.collapse { 812 | height: auto !important; 813 | overflow: visible !important; 814 | } 815 | } 816 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/public/css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.4 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}@media(max-width:767px){.visible-phone{display:inherit!important}.hidden-phone{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(min-width:768px) and (max-width:979px){.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:18px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:18px}.navbar-fixed-bottom{margin-top:18px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/public/css/flash.css: -------------------------------------------------------------------------------- 1 | .flash { 2 | padding: 8px 35px 8px 14px; 3 | margin-bottom: 18px; 4 | color: #c09853; 5 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); 6 | background-color: #fcf8e3; 7 | border: 1px solid #fbeed5; 8 | -webkit-border-radius: 4px; 9 | -moz-border-radius: 4px; 10 | border-radius: 4px; 11 | } 12 | 13 | .success { 14 | color: #468847; 15 | background-color: #dff0d8; 16 | border-color: #d6e9c6; 17 | } 18 | 19 | .error { 20 | color: #b94a48; 21 | background-color: #f2dede; 22 | border-color: #eed3d7; 23 | } 24 | -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turnbullpress/dockerbook-code/c57fe820c13f47dca64fa16c09f4e47a2198d9ff/code/6/tomcat/tprov/lib/tprov/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/turnbullpress/dockerbook-code/c57fe820c13f47dca64fa16c09f4e47a2198d9ff/code/6/tomcat/tprov/lib/tprov/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /code/6/tomcat/tprov/lib/tprov/views/index.erb: -------------------------------------------------------------------------------- 1 | 10 | 11 |

Add a new Tomcat Application

12 | 13 |
14 | 15 |
16 |