diff options
author | Cody Hiar <codyfh@gmail.com> | 2019-01-14 20:41:52 -0700 |
---|---|---|
committer | Cody Hiar <codyfh@gmail.com> | 2019-01-14 20:41:52 -0700 |
commit | e1c3d2ec14c1617fc779bccfdb64b4c09bdc6525 (patch) | |
tree | 08a2c3eaa0516cb2d2f984c01721bb457222b13b /examples | |
parent | a69b96fe168a05792288ef2e186a86e6540f85bd (diff) |
Alpha Version
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/example5.sh | 3 | ||||
-rw-r--r-- | examples/example6/docker-compose.yml | 23 | ||||
-rwxr-xr-x | examples/example6/example6.sh | 18 | ||||
-rwxr-xr-x | examples/example7/example7.sh | 18 | ||||
-rw-r--r-- | examples/example8/Dockerfile | 20 | ||||
-rw-r--r-- | examples/example8/docker-compose.yml | 14 | ||||
-rw-r--r-- | examples/example8/plugins.txt | 104 |
7 files changed, 199 insertions, 1 deletions
diff --git a/examples/example5.sh b/examples/example5.sh index aaaff17..64437e1 100755 --- a/examples/example5.sh +++ b/examples/example5.sh @@ -23,6 +23,7 @@ docker run -it \ --rm \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e DISPLAY=unix"$DISPLAY" \ - --device /dev/snd \ + --device /dev/snd:/dev/snd \ --name spotify \ + --user root \ jess/spotify diff --git a/examples/example6/docker-compose.yml b/examples/example6/docker-compose.yml new file mode 100644 index 0000000..082697c --- /dev/null +++ b/examples/example6/docker-compose.yml @@ -0,0 +1,23 @@ +version: '3.1' + +services: + + wordpress: + image: wordpress + restart: always + ports: + - 8000:80 + environment: + WORDPRESS_DB_HOST: db + WORDPRESS_DB_USER: exampleuser + WORDPRESS_DB_PASSWORD: examplepass + WORDPRESS_DB_NAME: exampledb + + db: + image: mysql:5.7 + restart: always + environment: + MYSQL_DATABASE: exampledb + MYSQL_USER: exampleuser + MYSQL_PASSWORD: examplepass + MYSQL_RANDOM_ROOT_PASSWORD: '1' diff --git a/examples/example6/example6.sh b/examples/example6/example6.sh new file mode 100755 index 0000000..9078da1 --- /dev/null +++ b/examples/example6/example6.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# vim: set filetype=sh +# +# Author: Cody Hiar +# Date: 2019-01-15 +# +# Description: run docker-compose command +# +# Set options: +# e: Stop script if command fails +# u: Stop script if unset variable is referenced +# x: Debug, print commands as they are executed +# o pipefail: If any command in a pipeline fails it all fails +# +set -exuo pipefail + +# Run the compose file +docker-compose up diff --git a/examples/example7/example7.sh b/examples/example7/example7.sh new file mode 100755 index 0000000..38cbbbc --- /dev/null +++ b/examples/example7/example7.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +# vim: set filetype=sh +# +# Author: Cody Hiar +# Date: 2019-01-15 +# +# Description: User cookiecutter to create templated docker project +# +# Set options: +# e: Stop script if command fails +# u: Stop script if unset variable is referenced +# x: Debug, print commands as they are executed +# o pipefail: If any command in a pipeline fails it all fails +# +set -exuo pipefail + +# Run cookiecutter +cookiecutter https://github.com/thornycrackers/cookiecutter_docker diff --git a/examples/example8/Dockerfile b/examples/example8/Dockerfile new file mode 100644 index 0000000..fee10e9 --- /dev/null +++ b/examples/example8/Dockerfile @@ -0,0 +1,20 @@ +FROM jenkins/jenkins:lts + +USER root + +RUN apt-get update && apt-get -y install \ + build-essential \ + libltdl-dev \ + sudo \ + rsync + +RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers + +# Install Plugins +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt + +# Prevent plugin install banner, we've pre-installed our plugins +RUN echo 2.0 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state + +USER jenkins diff --git a/examples/example8/docker-compose.yml b/examples/example8/docker-compose.yml new file mode 100644 index 0000000..dd8cc62 --- /dev/null +++ b/examples/example8/docker-compose.yml @@ -0,0 +1,14 @@ +version: '3' +services: + backend: + build: ./ + network_mode: "bridge" + container_name: jenkins_docker + image: thornycrackers/jenkins_docker + ports: + - "8080:8080" + - "50000:50000" + volumes: + - /var/jenkins_home:/var/jenkins_home + - /var/run/docker.sock:/var/run/docker.sock + - /usr/bin/docker:/usr/bin/docker diff --git a/examples/example8/plugins.txt b/examples/example8/plugins.txt new file mode 100644 index 0000000..37e62e1 --- /dev/null +++ b/examples/example8/plugins.txt @@ -0,0 +1,104 @@ +ace-editor:1.1 +antisamy-markup-formatter:1.5 +apache-httpcomponents-client-4-api:4.5.5-3.0 +authentication-tokens:1.3 +blueocean-autofavorite:1.2.2 +blueocean-bitbucket-pipeline:1.10.1 +blueocean-commons:1.10.1 +blueocean-config:1.10.1 +blueocean-core-js:1.10.1 +blueocean-dashboard:1.10.1 +blueocean-display-url:2.2.0 +blueocean-events:1.10.1 +blueocean-git-pipeline:1.10.1 +blueocean-github-pipeline:1.10.1 +blueocean-i18n:1.10.1 +blueocean-jira:1.10.1 +blueocean-jwt:1.10.1 +blueocean-personalization:1.10.1 +blueocean-pipeline-api-impl:1.10.1 +blueocean-pipeline-editor:1.10.1 +blueocean-pipeline-scm-api:1.10.1 +blueocean-rest-impl:1.10.1 +blueocean-rest:1.10.1 +blueocean-web:1.10.1 +blueocean:1.10.1 +bouncycastle-api:2.17 +branch-api:2.1.2 +build-timeout:1.19 +cloudbees-bitbucket-branch-source:2.3.0 +cloudbees-folder:6.7 +command-launcher:1.3 +credentials-binding:1.17 +credentials:2.1.18 +display-url-api:2.3.0 +docker-commons:1.13 +docker-workflow:1.17 +durable-task:1.28 +email-ext:2.63 +favorite:2.3.2 +git-client:2.7.5 +git-server:1.7 +git:3.9.1 +github-api:1.95 +github-branch-source:2.4.1 +github:1.29.3 +handlebars:1.1.1 +handy-uri-templates-2-api:2.1.6-1.0 +htmlpublisher:1.17 +jackson2-api:2.9.8 +jdk-tool:1.2 +jenkins-design-language:1.10.1 +jira:3.0.5 +jquery-detached:1.2.1 +jsch:0.1.54.2 +junit:1.26.1 +ldap:1.20 +locale:1.4 +lockable-resources:2.3 +mailer:1.23 +matrix-auth:2.3 +matrix-project:1.13 +mercurial:2.4 +momentjs:1.1.1 +pam-auth:1.4 +pipeline-build-step:2.7 +pipeline-github-lib:1.0 +pipeline-graph-analysis:1.9 +pipeline-input-step:2.9 +pipeline-milestone-step:1.3.1 +pipeline-model-api:1.3.4 +pipeline-model-declarative-agent:1.1.1 +pipeline-model-definition:1.3.4 +pipeline-model-extensions:1.3.4 +pipeline-rest-api:2.10 +pipeline-stage-step:2.3 +pipeline-stage-tags-metadata:1.3.4 +pipeline-stage-view:2.10 +plain-credentials:1.5 +publish-over-ssh:1.20.1 +pubsub-light:1.12 +resource-disposer:0.12 +scm-api:2.3.0 +script-security:1.49 +sse-gateway:1.17 +ssh-agent:1.17 +ssh-credentials:1.14 +ssh-slaves:1.29.4 +ssh:2.6.1 +structs:1.17 +timestamper:1.8.10 +token-macro:2.5 +variant:1.1 +workflow-aggregator:2.6 +workflow-api:2.33 +workflow-basic-steps:2.13 +workflow-cps-global-lib:2.12 +workflow-cps:2.61 +workflow-durable-task-step:2.27 +workflow-job:2.31 +workflow-multibranch:2.20 +workflow-scm-step:2.7 +workflow-step-api:2.17 +workflow-support:3.0 +ws-cleanup:0.37 |