├── .gitignore ├── images ├── php │ ├── func-tests │ │ ├── 5.4 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ ├── base │ │ │ │ ├── entrypoint.sh │ │ │ │ ├── php-fpm.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 5.5 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ ├── base │ │ │ │ ├── entrypoint.sh │ │ │ │ ├── php-fpm.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 5.6 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ ├── base │ │ │ │ ├── entrypoint.sh │ │ │ │ ├── php-fpm.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 7.0 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ ├── base │ │ │ │ ├── entrypoint.sh │ │ │ │ ├── php-fpm.conf │ │ │ │ ├── nginx.conf │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ └── README.md │ ├── unit-tests │ │ ├── 5.4 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 5.5 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 5.6 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ ├── 7.0 │ │ │ ├── sqlite │ │ │ │ └── Dockerfile │ │ │ ├── mysql │ │ │ │ └── Dockerfile │ │ │ ├── postgres │ │ │ │ └── Dockerfile │ │ │ └── oracle │ │ │ │ └── Dockerfile │ │ └── README.md │ └── build │ │ ├── Dockerfile │ │ └── README.md ├── push-all.sh ├── bamboo │ └── agent │ │ ├── docker │ │ ├── run-agent.sh │ │ ├── bamboo-agent-startup.sh │ │ ├── Dockerfile │ │ └── wrapdocker │ │ ├── state │ │ └── Dockerfile │ │ └── README.md ├── build-all.sh ├── push.sh ├── build.sh └── container-list ├── scripts ├── jobs │ ├── common │ │ ├── prepare-code.sh │ │ └── cleanup.sh │ ├── sniffer.sh │ ├── build │ │ ├── fetch-pr.sh │ │ ├── generate-archive.sh │ │ └── prepare-sources.sh │ ├── unit-tests.sh │ └── functional-tests.sh ├── bamboo-env-mapping.sh ├── local-env-mapping.sh ├── utils │ ├── get-tests-result.sh │ ├── set-result-status.sh │ └── set-status.sh └── db │ ├── sqlite.sh │ ├── oracle.sh │ ├── postgres.sh │ └── mysql.sh └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | instantclient* 2 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.4-base:latest 2 | MAINTAINER Tristan Darricau 3 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.5-base:latest 2 | MAINTAINER Tristan Darricau 3 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.6-base:latest 2 | MAINTAINER Tristan Darricau 3 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-7.0-base:latest 2 | MAINTAINER Tristan Darricau 3 | -------------------------------------------------------------------------------- /images/push-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Push all the images 4 | 5 | jobs=$1 6 | jobs=${jobs:=4} 7 | 8 | parallel -j $jobs -a container-list ./push.sh 9 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-7.0-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN docker-php-ext-install mysqli pdo_mysql 5 | -------------------------------------------------------------------------------- /images/bamboo/agent/docker/run-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "HOME: $1" 4 | java -Dbamboo.home="$1" -jar /bamboo/atlassian-bamboo-agent-installer.jar $BAMBOO_SERVER/agentServer/ 5 | 6 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.4-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN docker-php-ext-install mysqli pdo_mysql mysql 5 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.5-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN docker-php-ext-install mysqli pdo_mysql mysql 5 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.6-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN docker-php-ext-install mysqli pdo_mysql mysql 5 | -------------------------------------------------------------------------------- /scripts/jobs/common/prepare-code.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker run \ 4 | --user $(id -u):$(id -g) \ 5 | --volume ${WORKING_DIR}:/data \ 6 | --workdir /data \ 7 | debian tar -p -x -z -f source_code.tar.gz 8 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.4/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.5/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.5 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.6/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | -------------------------------------------------------------------------------- /images/php/unit-tests/7.0/sqlite/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.4-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y libpq-dev \ 6 | && docker-php-ext-install pdo_pgsql pgsql \ 7 | && rm -r /var/lib/apt/lists/* 8 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.5-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y libpq-dev \ 6 | && docker-php-ext-install pdo_pgsql pgsql \ 7 | && rm -r /var/lib/apt/lists/* 8 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.6-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y libpq-dev \ 6 | && docker-php-ext-install pdo_pgsql pgsql \ 7 | && rm -r /var/lib/apt/lists/* 8 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-7.0-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y libpq-dev \ 6 | && docker-php-ext-install pdo_pgsql pgsql \ 7 | && rm -r /var/lib/apt/lists/* 8 | -------------------------------------------------------------------------------- /images/php/unit-tests/7.0/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN docker-php-ext-install mysqli pdo_mysql 8 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.4/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN docker-php-ext-install mysqli pdo_mysql mysql 8 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.5/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.5 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN docker-php-ext-install mysqli pdo_mysql mysql 8 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.6/mysql/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN docker-php-ext-install mysqli pdo_mysql mysql 8 | -------------------------------------------------------------------------------- /images/bamboo/agent/state/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM busybox 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN adduser -S -D -H -u 1100 atlassian atlassian 5 | 6 | RUN mkdir -p /bamboo/home && chown atlassian:atlassian /bamboo/home 7 | VOLUME /bamboo/home 8 | 9 | CMD ["echo", "State volume for the bamboo agent"] 10 | 11 | -------------------------------------------------------------------------------- /scripts/jobs/sniffer.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker run \ 4 | --user $(id -u):$(id -g) \ 5 | --volume ${WORKING_DIR}:/data \ 6 | --workdir /data \ 7 | php:5.6 sh -c ' 8 | cd build && 9 | ../phpBB/vendor/bin/phing sniff && 10 | echo 0 > logs/sniffs_res || 11 | echo 1 > logs/sniffs_res' 12 | -------------------------------------------------------------------------------- /scripts/bamboo-env-mapping.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export IMAGES_TAG=${bamboo_images_tag} 4 | 5 | export WORKING_DIR=${bamboo_working_directory} 6 | export PR_NUMBER=${bamboo_PRnumber} 7 | export GITHUB_TOKEN=${bamboo_github_token_password} 8 | export COMPOSER_HOME=${bamboo_composer_home} 9 | export BUILD_RESULT_URL=${bamboo_buildResultsUrl} 10 | -------------------------------------------------------------------------------- /scripts/local-env-mapping.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export IMAGES_TAG=':latest' 4 | 5 | export WORKING_DIR="$(git rev-parse --show-toplevel)" 6 | export PR_NUMBER='' 7 | export GITHUB_TOKEN="$(cd "$WORKING_DIR"/phpBB;php ../composer.phar config github-oauth.github.com)" 8 | export COMPOSER_HOME="$(cd "$WORKING_DIR"/phpBB;php ../composer.phar config home)" 9 | export BUILD_RESULT_URL='' 10 | -------------------------------------------------------------------------------- /scripts/utils/get-tests-result.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if [ -s build/logs/phpunit.xml ]; then 4 | res=$(cat build/logs/sniffs_res 2>/dev/null) 5 | if ( grep 'failures="[^0]"' build/logs/phpunit.xml ); then 6 | res=1 7 | elif ( grep 'errors="[^0]"' build/logs/phpunit.xml ); then 8 | res=2 9 | else 10 | res=0 11 | fi 12 | else 13 | res=2 14 | fi 15 | 16 | echo ${res} 17 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.4/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y libpq-dev \ 9 | && docker-php-ext-install pdo_pgsql pgsql \ 10 | && rm -r /var/lib/apt/lists/* 11 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.5/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.5 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y libpq-dev \ 9 | && docker-php-ext-install pdo_pgsql pgsql \ 10 | && rm -r /var/lib/apt/lists/* 11 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.6/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y libpq-dev \ 9 | && docker-php-ext-install pdo_pgsql pgsql \ 10 | && rm -r /var/lib/apt/lists/* 11 | -------------------------------------------------------------------------------- /images/php/unit-tests/7.0/postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y libpq-dev \ 9 | && docker-php-ext-install pdo_pgsql pgsql \ 10 | && rm -r /var/lib/apt/lists/* 11 | -------------------------------------------------------------------------------- /scripts/db/sqlite.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export PHPBB_TEST_DBMS='phpbb\db\driver\sqlite3' 4 | export PHPBB_TEST_DBHOST='/dev/shm/phpbb_unit_tests.sqlite3' 5 | export PHPBB_TEST_DBPORT='' 6 | export PHPBB_TEST_DBNAME='' 7 | export PHPBB_TEST_DBUSER='' 8 | export PHPBB_TEST_DBPASSWD='' 9 | export PHPBB_TEST_TABLE_PREFIX='phpbb_' 10 | export DOCKER_LINK='' 11 | 12 | function start_db { 13 | true 14 | } 15 | -------------------------------------------------------------------------------- /scripts/jobs/common/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # We assume the docker daemon is dedicated to the current job (the jobs runs on isolated docker daemon) 4 | # Stop running containers 5 | for container in $(docker ps -q) 6 | do 7 | docker stop $container || true 8 | done 9 | 10 | # Removing containers 11 | for container in $(docker ps -a -q) 12 | do 13 | docker rm -v $container || true 14 | done 15 | -------------------------------------------------------------------------------- /images/php/build/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y \ 9 | git \ 10 | zlib1g-dev \ 11 | && docker-php-ext-install zip \ 12 | && rm -r /var/lib/apt/lists/* 13 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/base/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | addgroup phpbb --gid $TEST_GID 4 | adduser --disabled-password --ingroup phpbb --gecos "" --uid $TEST_UID phpbb 5 | 6 | echo "Starting php-fpm..." 7 | php-fpm --allow-to-run-as-root >/dev/null 2>&1 & 8 | sleep 1 9 | 10 | echo "Starting nginx..." 11 | nginx -g 'daemon on;' >/dev/null 2>&1 & 12 | sleep 1 13 | 14 | echo "Running command..." 15 | runuser -m phpbb -s /bin/bash -c "$*" 16 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/base/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | addgroup phpbb --gid $TEST_GID 4 | adduser --disabled-password --ingroup phpbb --gecos "" --uid $TEST_UID phpbb 5 | 6 | echo "Starting php-fpm..." 7 | php-fpm --allow-to-run-as-root >/dev/null 2>&1 & 8 | sleep 1 9 | 10 | echo "Starting nginx..." 11 | nginx -g 'daemon on;' >/dev/null 2>&1 & 12 | sleep 1 13 | 14 | echo "Running command..." 15 | runuser -m phpbb -s /bin/bash -c "$*" 16 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/base/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | addgroup phpbb --gid $TEST_GID 4 | adduser --disabled-password --ingroup phpbb --gecos "" --uid $TEST_UID phpbb 5 | 6 | echo "Starting php-fpm..." 7 | php-fpm --allow-to-run-as-root >/dev/null 2>&1 & 8 | sleep 1 9 | 10 | echo "Starting nginx..." 11 | nginx -g 'daemon on;' >/dev/null 2>&1 & 12 | sleep 1 13 | 14 | echo "Running command..." 15 | runuser -m phpbb -s /bin/bash -c "$*" 16 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/base/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | addgroup phpbb --gid $TEST_GID 4 | adduser --disabled-password --ingroup phpbb --gecos "" --uid $TEST_UID phpbb 5 | 6 | echo "Starting php-fpm..." 7 | php-fpm --allow-to-run-as-root >/dev/null 2>&1 & 8 | sleep 1 9 | 10 | echo "Starting nginx..." 11 | nginx -g 'daemon on;' >/dev/null 2>&1 & 12 | sleep 1 13 | 14 | echo "Running command..." 15 | runuser -m phpbb -s /bin/bash -c "$*" 16 | -------------------------------------------------------------------------------- /images/bamboo/agent/docker/bamboo-agent-startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # start the docker daemon 4 | #LOG=file /usr/local/bin/wrapdocker & 5 | #docker daemon -s overlay &>/var/log/docker.log 6 | /usr/local/bin/wrapdocker docker daemon \ 7 | --host=unix:///var/run/docker.sock \ 8 | --host=tcp://0.0.0.0:2375 \ 9 | --storage-driver=vfs & 10 | 11 | # start the bamboo agent 12 | runuser -m atlassian -s /bin/bash -c "/bamboo/run-agent.sh /bamboo/home/" 13 | 14 | -------------------------------------------------------------------------------- /images/build-all.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Updates php images 4 | docker pull php:5.4 5 | docker pull php:5.5 6 | docker pull php:5.6 7 | docker pull php:7.0 8 | docker pull php:5.4-fpm 9 | docker pull php:5.5-fpm 10 | docker pull php:5.6-fpm 11 | docker pull php:7.0-fpm 12 | 13 | # Build all the new images 14 | 15 | jobs=$1 16 | jobs=${jobs:=4} 17 | 18 | #parallel -j $jobs -a container-list ./build.sh 19 | parallel -j 1 -a container-list ./build.sh 20 | -------------------------------------------------------------------------------- /scripts/jobs/build/fetch-pr.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker run \ 4 | --user $(id -u):$(id -g) \ 5 | --volume ${WORKING_DIR}:/data \ 6 | --workdir /data \ 7 | phpbb/build${IMAGES_TAG} sh -c ' 8 | git config user.email "no-reply@phpbb.com" && 9 | git config user.name "phpBB CI" && 10 | git remote set-url origin "https://github.com/phpbb/phpbb.git" && 11 | git fetch origin +refs/pull/'${PR_NUMBER}'/merge && 12 | git checkout FETCH_HEAD' 13 | -------------------------------------------------------------------------------- /scripts/db/oracle.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export PHPBB_TEST_DBMS='phpbb\db\driver\oracle' 4 | export PHPBB_TEST_DBHOST='oracle' 5 | export PHPBB_TEST_DBPORT='1521' 6 | export PHPBB_TEST_DBNAME='xe' 7 | export PHPBB_TEST_DBUSER='system' 8 | export PHPBB_TEST_DBPASSWD='oracle' 9 | export PHPBB_TEST_TABLE_PREFIX='phpbb_' 10 | export DOCKER_LINK='--link oracle:oracle' 11 | 12 | function start_db { 13 | docker run -d --name oracle wnameless/oracle-xe-11g 14 | docker run --rm --link oracle:oracle -e TARGETS=oracle:1521 waisbrot/wait 15 | } 16 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/base/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = phpbb 15 | group = phpbb 16 | 17 | listen = 9000 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/base/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = phpbb 15 | group = phpbb 16 | 17 | listen = [::]:9000 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/base/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = phpbb 15 | group = phpbb 16 | 17 | listen = [::]:9000 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/base/php-fpm.conf: -------------------------------------------------------------------------------- 1 | ; This file was initially adapated from the output of: (on PHP 5.6) 2 | ; grep -vE '^;|^ *$' /usr/local/etc/php-fpm.conf.default 3 | 4 | [global] 5 | 6 | error_log = /proc/self/fd/2 7 | daemonize = no 8 | 9 | [www] 10 | 11 | ; if we send this to /proc/self/fd/1, it never appears 12 | access.log = /proc/self/fd/2 13 | 14 | user = phpbb 15 | group = phpbb 16 | 17 | listen = [::]:9000 18 | 19 | pm = dynamic 20 | pm.max_children = 5 21 | pm.start_servers = 2 22 | pm.min_spare_servers = 1 23 | pm.max_spare_servers = 3 24 | 25 | clear_env = no 26 | -------------------------------------------------------------------------------- /images/bamboo/agent/README.md: -------------------------------------------------------------------------------- 1 | Bamboo Agent 2 | ============ 3 | 4 | - `phpbb/bamboo-agent-docker` launch a bamboo agent with the docker support (through docker in docker) 5 | - `phpbb/bamboo-agent-state` is used in combination with the agent image to store its state 6 | 7 | To launch the agent with its state container: 8 | ``` 9 | docker run --name bamboo-agent-state phpbb/bamboo-agent-state 10 | docker run --privileged -h bamboo-agent -e HOME=/bamboo/home/ -e BAMBOO_SERVER=https://bamboo.phpbb.com/ -d --name bamboo-agent --volumes-from bamboo-agent-state phpbb/bamboo-agent-docker 11 | ``` 12 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/base/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | root /data/phpBB/; 4 | index index.php index.html; 5 | 6 | access_log /var/log/nginx/access.log; 7 | error_log /var/log/nginx/error.log; 8 | 9 | location ~ \.php { 10 | include fastcgi_params; 11 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 12 | fastcgi_param PATH_INFO $fastcgi_path_info; 13 | fastcgi_param SCRIPT_FILENAME /data/phpBB$fastcgi_script_name; 14 | fastcgi_pass localhost:9000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/base/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | root /data/phpBB/; 4 | index index.php index.html; 5 | 6 | access_log /var/log/nginx/access.log; 7 | error_log /var/log/nginx/error.log; 8 | 9 | location ~ \.php { 10 | include fastcgi_params; 11 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 12 | fastcgi_param PATH_INFO $fastcgi_path_info; 13 | fastcgi_param SCRIPT_FILENAME /data/phpBB$fastcgi_script_name; 14 | fastcgi_pass localhost:9000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/base/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | root /data/phpBB/; 4 | index index.php index.html; 5 | 6 | access_log /var/log/nginx/access.log; 7 | error_log /var/log/nginx/error.log; 8 | 9 | location ~ \.php { 10 | include fastcgi_params; 11 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 12 | fastcgi_param PATH_INFO $fastcgi_path_info; 13 | fastcgi_param SCRIPT_FILENAME /data/phpBB$fastcgi_script_name; 14 | fastcgi_pass localhost:9000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/base/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | root /data/phpBB/; 4 | index index.php index.html; 5 | 6 | access_log /var/log/nginx/access.log; 7 | error_log /var/log/nginx/error.log; 8 | 9 | location ~ \.php { 10 | include fastcgi_params; 11 | fastcgi_split_path_info ^(.+\.php)(/.*)$; 12 | fastcgi_param PATH_INFO $fastcgi_path_info; 13 | fastcgi_param SCRIPT_FILENAME /data/phpBB$fastcgi_script_name; 14 | fastcgi_pass localhost:9000; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /images/php/build/README.md: -------------------------------------------------------------------------------- 1 | PHP - build 2 | =========== 3 | 4 | Image to prepare the code for the tests (composer, build directories...) 5 | 6 | Composer: 7 | ``` 8 | docker run \ 9 | --volume $(pwd):/data \ 10 | --volume ~/.composer:/composer \ 11 | --workdir /data \ 12 | --rm \ 13 | -ti \ 14 | phpbb/build sh -c 'cd phpBB; COMPOSER_HOME=/composer php ../composer.phar install --dev' 15 | ``` 16 | 17 | Phing prepare: 18 | ``` 19 | docker run \ 20 | --volume $(pwd):/data \ 21 | --workdir /data \ 22 | --rm \ 23 | -ti \ 24 | phpbb/build sh -c 'cd build; ../phpBB/vendor/bin/phing clean prepare' 25 | ``` 26 | -------------------------------------------------------------------------------- /scripts/jobs/build/generate-archive.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cat < generate-archive.sh 4 | git remote set-url origin "https://github.com/phpbb/phpbb.git" 5 | git fetch origin +refs/pull/${PR_NUMBER}/head 6 | last_commit=\$(git rev-parse FETCH_HEAD) 7 | echo "\$last_commit" > build/logs/last_commit 8 | tar --exclude-backups --exclude-vcs --exclude='.git' --exclude='generate-archive.sh' -p -c -z -f source_code.tar.gz * 9 | EOL 10 | 11 | docker run \ 12 | --user $(id -u):$(id -g) \ 13 | --volume ${WORKING_DIR}:/data \ 14 | --workdir /data \ 15 | phpbb/build${IMAGES_TAG} sh generate-archive.sh 16 | 17 | rm generate-archive.sh 18 | -------------------------------------------------------------------------------- /scripts/utils/set-result-status.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | last_commit=$(cat build/logs/last_commit) 4 | 5 | result_file=$1 6 | step=$2 7 | 8 | if [ -s build/logs/${result_file} ]; then 9 | res=$(cat build/logs/${result_file} 2>/dev/null) 10 | else 11 | res=2 12 | fi 13 | 14 | if [ $res -eq 0 ]; then 15 | echo Send success 16 | $(dirname "$0")/set-status.sh 'success' 'The Bamboo build is a success' "${step}" 17 | elif [ $res -eq 1 ]; then 18 | echo Send Failure 19 | $(dirname "$0")/set-status.sh 'failure' 'The Bamboo build failed' "${step}" 20 | else 21 | echo Send error 22 | $(dirname "$0")/set-status.sh 'error' 'The Bamboo build is in error' "${step}" 23 | fi 24 | -------------------------------------------------------------------------------- /scripts/utils/set-status.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | last_commit=$(cat build/logs/last_commit) 4 | 5 | status=$1 6 | description=$2 7 | step=$3 8 | 9 | env 10 | 11 | echo '---------------------' 12 | echo curl -H "Authorization: token ${GITHUB_TOKEN}" --request POST --data "{\"state\": \"${status}\", \"description\": \"${description}\", \"target_url\": \"${BUILD_RESULT_URL}\", \"context\": \"phpBB continuous integration - ${step}\"}" https://api.github.com/repos/phpbb/phpbb/statuses/${last_commit} 13 | echo '---------------------' 14 | curl -H "Authorization: token ${GITHUB_TOKEN}" --request POST --data "{\"state\": \"${status}\", \"description\": \"${description}\", \"target_url\": \"${BUILD_RESULT_URL}\", \"context\": \"phpBB continuous integration - ${step}\"}" https://api.github.com/repos/phpbb/phpbb/statuses/${last_commit} 15 | -------------------------------------------------------------------------------- /scripts/jobs/unit-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pwd=$(dirname "$0") 4 | 5 | db=$1 6 | php=$2 7 | 8 | . ${pwd}/../db/${db}.sh 9 | 10 | start_db 11 | 12 | docker run \ 13 | --user $(id -u):$(id -g) \ 14 | ${DOCKER_LINK} \ 15 | --env PHPBB_TEST_DBMS="${PHPBB_TEST_DBMS}" \ 16 | --env PHPBB_TEST_DBHOST="${PHPBB_TEST_DBHOST}" \ 17 | --env PHPBB_TEST_DBPORT="${PHPBB_TEST_DBPORT}" \ 18 | --env PHPBB_TEST_DBNAME="${PHPBB_TEST_DBNAME}" \ 19 | --env PHPBB_TEST_DBUSER="${PHPBB_TEST_DBUSER}" \ 20 | --env PHPBB_TEST_DBPASSWD="${PHPBB_TEST_DBPASSWD}" \ 21 | --env PHPBB_TEST_TABLE_PREFIX="${PHPBB_TEST_TABLE_PREFIX}" \ 22 | --volume ${WORKING_DIR}:/data \ 23 | --workdir /data \ 24 | phpbb/php-ut-${php}-${db}${IMAGES_TAG} php -d memory_limit=-1 phpBB/vendor/bin/phpunit --group __nogroup__ --log-junit build/logs/phpunit.xml 25 | -------------------------------------------------------------------------------- /scripts/db/postgres.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export PHPBB_TEST_DBMS='phpbb\db\driver\postgres' 4 | export PHPBB_TEST_DBHOST='postgres' 5 | export PHPBB_TEST_DBPORT='5432' 6 | export PHPBB_TEST_DBNAME='phpbb_tests' 7 | export PHPBB_TEST_DBUSER='postgres' 8 | export PHPBB_TEST_DBPASSWD='' 9 | export PHPBB_TEST_TABLE_PREFIX='phpbb_' 10 | export DOCKER_LINK='--link postgres:postgres' 11 | 12 | function start_db { 13 | docker run \ 14 | -d \ 15 | --name postgres \ 16 | --env POSTGRES_PASSWORD='' \ 17 | --env POSTGRES_USER='postgres' \ 18 | postgres 19 | 20 | docker run --rm --link postgres:postgres waisbrot/wait 21 | sleep 1 22 | 23 | docker run --link postgres:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U postgres -c "create database phpbb_tests;"' 24 | } 25 | -------------------------------------------------------------------------------- /images/php/func-tests/README.md: -------------------------------------------------------------------------------- 1 | PHP 2 | === 3 | 4 | Various images to run the unit tests. 5 | 6 | Usage (from the phpBB root directory): 7 | ``` 8 | docker run -d --name mysql -e MYSQL_ROOT_PASSWORD='' -e MYSQL_DATABASE='phpbb_tests' -e MYSQL_ALLOW_EMPTY_PASSWORD='yes' mysql 9 | docker run --rm --link mysql:mysql aanand/wait 10 | docker run \ 11 | --rm \ 12 | -ti \ 13 | --link mysql:mysql \ 14 | --env PHPBB_TEST_DBMS="phpbb\db\driver\mysql" \ 15 | --env PHPBB_TEST_DBHOST="mysql" \ 16 | --env PHPBB_TEST_DBPORT="3306" \ 17 | --env PHPBB_TEST_DBNAME="phpbb_tests" \ 18 | --env PHPBB_TEST_DBUSER="root" \ 19 | --env PHPBB_TEST_DBPASSWD="" \ 20 | --env PHPBB_TEST_TABLE_PREFIX="phpbb_" \ 21 | --volume $(pwd):/data \ 22 | --workdir /data \ 23 | phpbb/php-5.6-mysql php -d memory_limit=-1 phpBB/vendor/bin/phpunit --group __nogroup__ --log-junit build/logs/phpunit.xml 24 | ``` 25 | -------------------------------------------------------------------------------- /images/php/unit-tests/README.md: -------------------------------------------------------------------------------- 1 | PHP 2 | === 3 | 4 | Various images to run the unit tests. 5 | 6 | Usage (from the phpBB root directory): 7 | ``` 8 | docker run -d --name mysql -e MYSQL_ROOT_PASSWORD='' -e MYSQL_DATABASE='phpbb_tests' -e MYSQL_ALLOW_EMPTY_PASSWORD='yes' mysql 9 | docker run --rm --link mysql:mysql aanand/wait 10 | docker run \ 11 | --rm \ 12 | -ti \ 13 | --link mysql:mysql \ 14 | --env PHPBB_TEST_DBMS="phpbb\db\driver\mysql" \ 15 | --env PHPBB_TEST_DBHOST="mysql" \ 16 | --env PHPBB_TEST_DBPORT="3306" \ 17 | --env PHPBB_TEST_DBNAME="phpbb_tests" \ 18 | --env PHPBB_TEST_DBUSER="root" \ 19 | --env PHPBB_TEST_DBPASSWD="" \ 20 | --env PHPBB_TEST_TABLE_PREFIX="phpbb_" \ 21 | --volume $(pwd):/data \ 22 | --workdir /data \ 23 | phpbb/php-5.6-mysql php -d memory_limit=-1 phpBB/vendor/bin/phpunit --group __nogroup__ --log-junit build/logs/phpunit.xml 24 | ``` 25 | -------------------------------------------------------------------------------- /scripts/jobs/functional-tests.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | pwd=$(dirname "$0") 4 | 5 | db=$1 6 | php=$2 7 | 8 | . ${pwd}/../db/${db}.sh 9 | 10 | start_db 11 | 12 | docker run \ 13 | --env TEST_UID=$(id -u) \ 14 | --env TEST_GID=$(id -g) \ 15 | ${DOCKER_LINK} \ 16 | --env PHPBB_TEST_DBMS="${PHPBB_TEST_DBMS}" \ 17 | --env PHPBB_TEST_DBHOST="${PHPBB_TEST_DBHOST}" \ 18 | --env PHPBB_TEST_DBPORT="${PHPBB_TEST_DBPORT}" \ 19 | --env PHPBB_TEST_DBNAME="${PHPBB_TEST_DBNAME}" \ 20 | --env PHPBB_TEST_DBUSER="${PHPBB_TEST_DBUSER}" \ 21 | --env PHPBB_TEST_DBPASSWD="${PHPBB_TEST_DBPASSWD}" \ 22 | --env PHPBB_TEST_TABLE_PREFIX="${PHPBB_TEST_TABLE_PREFIX}" \ 23 | --env PHPBB_FUNCTIONAL_URL="http://localhost/" \ 24 | --volume ${WORKING_DIR}:/data \ 25 | --workdir /data \ 26 | phpbb/php-ft-${php}-${db}${IMAGES_TAG} php -d memory_limit=-1 phpBB/vendor/bin/phpunit --group functional --log-junit build/logs/phpunit.xml 27 | -------------------------------------------------------------------------------- /scripts/db/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export PHPBB_TEST_DBMS='phpbb\db\driver\mysqli' 4 | export PHPBB_TEST_DBHOST='mysql' 5 | export PHPBB_TEST_DBPORT='3306' 6 | export PHPBB_TEST_DBNAME='phpbb_tests' 7 | export PHPBB_TEST_DBUSER='root' 8 | export PHPBB_TEST_DBPASSWD='' 9 | export PHPBB_TEST_TABLE_PREFIX='phpbb_' 10 | export DOCKER_LINK='--link mysql:mysql' 11 | 12 | function start_db { 13 | cat < /tmp/phpbb.cnf 14 | [mysqld] 15 | default-storage-engine=MyISAM 16 | default-tmp-storage-engine=MyISAM 17 | tmpdir=/dev/shm/ 18 | datadir=/dev/shm/ 19 | EOL 20 | 21 | docker run \ 22 | -d \ 23 | --volume /tmp/phpbb.cnf:/etc/mysql/conf.d/phpbb.cnf \ 24 | --name mysql \ 25 | --shm-size=256M \ 26 | --env MYSQL_ROOT_PASSWORD='' \ 27 | --env MYSQL_DATABASE='phpbb_tests' \ 28 | --env MYSQL_ALLOW_EMPTY_PASSWORD='yes' \ 29 | mysql 30 | 31 | docker run --rm --link mysql:mysql waisbrot/wait 32 | } 33 | -------------------------------------------------------------------------------- /scripts/jobs/build/prepare-sources.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Ensure the github oauth token is set 4 | docker run \ 5 | --user $(id -u):$(id -g) \ 6 | --volume ${WORKING_DIR}:/data \ 7 | --volume ${COMPOSER_HOME}:/composer/ \ 8 | --workdir /data \ 9 | phpbb/build${IMAGES_TAG} sh -c "COMPOSER_HOME=/composer php composer.phar config -g github-oauth.github.com ${GITHUB_TOKEN}" 10 | 11 | docker run \ 12 | --user $(id -u):$(id -g) \ 13 | --volume ${WORKING_DIR}:/data \ 14 | --volume ${COMPOSER_HOME}:/composer/ \ 15 | --workdir /data \ 16 | phpbb/build${IMAGES_TAG} sh -c ' 17 | git config user.email "no-reply@phpbb.com" && 18 | git config user.name "phpBB CI" && 19 | cd phpBB && 20 | COMPOSER_HOME=/composer php ../composer.phar install --dev' 21 | 22 | docker run \ 23 | --user $(id -u):$(id -g) \ 24 | --volume ${WORKING_DIR}:/data \ 25 | --workdir /data \ 26 | phpbb/build${IMAGES_TAG} sh -c 'cd build; ../phpBB/vendor/bin/phing clean prepare' 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Docker for phpBB 2 | ================ 3 | 4 | This repository contains a set of scripts and Dockerfiles used to run the tests in various environment. 5 | 6 | Dockerfiles 7 | ----------- 8 | 9 | The directory `ìmages/php/` contains the dockerfiles of a set of images pre configured to run phpBB unit or functional tests. And `ìmages/bamboo/` a dockerfile which can be used to run an agent compatible with our Bamboo installation (NB: no need to try to use it, the agents needs to be manually authenticated). 10 | 11 | `ìmages/` also contains a set of scripts which can be used to build and push all images easily. 12 | 13 | Scripts 14 | ------- 15 | 16 | `scripts/` contains a set of scripts used to run the tests on our Bamboo instance. 17 | They can also be used to run the tests locally: 18 | 19 | ``` 20 | $ source docker/scripts/local-env-mapping.sh 21 | $ docker/scripts/jobs/unit-tests.sh 22 | $ docker/scripts/jobs/functional-tests.sh 23 | ``` 24 | 25 | db being: sqlite|postgres|mysql|oracle 26 | and php version: 5.4|5.5|5.6|7.0 27 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4-fpm 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN mkdir -p /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 5 | RUN chown www-data:www-data /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 6 | 7 | VOLUME /var/www/html/cache 8 | VOLUME /var/www/html/store 9 | VOLUME /var/www/html/files 10 | VOLUME /var/www/html/images/avatars/upload/ 11 | 12 | COPY php-fpm.conf /usr/local/etc/ 13 | 14 | # Install nginx 15 | RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 16 | RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list 17 | 18 | ENV NGINX_VERSION 1.9.2-1~jessie 19 | 20 | RUN apt-get update && \ 21 | apt-get install -y ca-certificates nginx=${NGINX_VERSION} && \ 22 | rm -rf /var/lib/apt/lists/* 23 | 24 | VOLUME ["/var/cache/nginx"] 25 | 26 | EXPOSE 80 443 27 | 28 | COPY entrypoint.sh /entrypoint.sh 29 | RUN chmod +x /entrypoint.sh 30 | 31 | COPY nginx.conf /etc/nginx/conf.d/default.conf 32 | 33 | ENTRYPOINT ["/entrypoint.sh"] 34 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.5-fpm 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN mkdir -p /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 5 | RUN chown www-data:www-data /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 6 | 7 | VOLUME /var/www/html/cache 8 | VOLUME /var/www/html/store 9 | VOLUME /var/www/html/files 10 | VOLUME /var/www/html/images/avatars/upload/ 11 | 12 | COPY php-fpm.conf /usr/local/etc/ 13 | 14 | # Install nginx 15 | RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 16 | RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list 17 | 18 | ENV NGINX_VERSION 1.9.2-1~jessie 19 | 20 | RUN apt-get update && \ 21 | apt-get install -y ca-certificates nginx=${NGINX_VERSION} && \ 22 | rm -rf /var/lib/apt/lists/* 23 | 24 | VOLUME ["/var/cache/nginx"] 25 | 26 | EXPOSE 80 443 27 | 28 | COPY entrypoint.sh /entrypoint.sh 29 | RUN chmod +x /entrypoint.sh 30 | 31 | COPY nginx.conf /etc/nginx/conf.d/default.conf 32 | 33 | ENTRYPOINT ["/entrypoint.sh"] 34 | -------------------------------------------------------------------------------- /images/push.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | push_image() { 4 | echo -e "\e[0;32mPushing $1\e[0m" 5 | 6 | if [[ ! $DOCKER_PUSH_DRYRUN == 1 ]] 7 | then 8 | docker push "$1" 9 | res=$? 10 | else 11 | res=0 12 | fi 13 | 14 | return $res 15 | } 16 | 17 | # Usage: One argument with the image name (with its tag) 18 | # example: "phpbb/php-ft-5.4-postgres:1" 19 | 20 | if [[ -z $1 ]] 21 | then 22 | exit 23 | fi 24 | 25 | if [[ $1 == \;* ]] 26 | then 27 | echo -e "\e[0;34mIgnore $1\e[0m" 28 | exit 29 | fi 30 | 31 | arr=($1) 32 | image=${arr[0]} 33 | 34 | arr=(${image//:/ }) 35 | image=${arr[0]} 36 | tag=${arr[1]} 37 | 38 | if [[ -z $tag ]] 39 | then 40 | push_image "$image" 41 | res=$? 42 | else 43 | arg='"name": "'$tag'"' 44 | new=$(curl https://registry.hub.docker.com//v1/repositories/"$image"/tags 2>/dev/null | grep "$arg") 45 | 46 | # Has the required tag already been pushed? 47 | if [[ -z $new || $DOCKER_PUSH_FORCE == 1 ]] 48 | then 49 | push_image "$image:latest" 50 | push_image "$image:$tag" 51 | res=$? 52 | else 53 | echo -e "\e[0;33mSkip $image:$tag\e[0m" 54 | res=0 55 | fi 56 | fi 57 | 58 | if [[ ! $res == 0 ]] 59 | then 60 | echo -e $log 61 | fi 62 | exit $res 63 | 64 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6-fpm 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN mkdir -p /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 5 | RUN chown www-data:www-data /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 6 | 7 | VOLUME /var/www/html/cache 8 | VOLUME /var/www/html/store 9 | VOLUME /var/www/html/files 10 | VOLUME /var/www/html/images/avatars/upload/ 11 | 12 | COPY php-fpm.conf /usr/local/etc/ 13 | 14 | # Install nginx 15 | RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 16 | RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list 17 | 18 | ENV NGINX_VERSION 1.9.2-1~jessie 19 | 20 | RUN apt-get update && \ 21 | apt-get install -y ca-certificates nginx=${NGINX_VERSION} && \ 22 | rm -rf /var/lib/apt/lists/* 23 | 24 | # forward request and error logs to docker log collector 25 | # RUN ln -sf /dev/stdout /var/log/nginx/access.log 26 | # RUN ln -sf /dev/stderr /var/log/nginx/error.log 27 | 28 | VOLUME ["/var/cache/nginx"] 29 | 30 | EXPOSE 80 443 31 | 32 | COPY entrypoint.sh /entrypoint.sh 33 | RUN chmod +x /entrypoint.sh 34 | 35 | COPY nginx.conf /etc/nginx/conf.d/default.conf 36 | 37 | ENTRYPOINT ["/entrypoint.sh"] 38 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0-fpm 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN mkdir -p /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 5 | RUN chown www-data:www-data /var/www/html/cache /var/www/html/store /var/www/html/files /var/www/html/images/avatars/upload/ 6 | 7 | VOLUME /var/www/html/cache 8 | VOLUME /var/www/html/store 9 | VOLUME /var/www/html/files 10 | VOLUME /var/www/html/images/avatars/upload/ 11 | 12 | COPY php-fpm.conf /usr/local/etc/ 13 | 14 | # Install nginx 15 | RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 16 | RUN echo "deb http://nginx.org/packages/mainline/debian/ jessie nginx" >> /etc/apt/sources.list 17 | 18 | ENV NGINX_VERSION 1.9.2-1~jessie 19 | 20 | RUN apt-get update && \ 21 | apt-get install -y ca-certificates nginx=${NGINX_VERSION} && \ 22 | rm -rf /var/lib/apt/lists/* 23 | 24 | # forward request and error logs to docker log collector 25 | # RUN ln -sf /dev/stdout /var/log/nginx/access.log 26 | # RUN ln -sf /dev/stderr /var/log/nginx/error.log 27 | 28 | VOLUME ["/var/cache/nginx"] 29 | 30 | EXPOSE 80 443 31 | 32 | COPY entrypoint.sh /entrypoint.sh 33 | RUN chmod +x /entrypoint.sh 34 | 35 | COPY nginx.conf /etc/nginx/conf.d/default.conf 36 | 37 | ENTRYPOINT ["/entrypoint.sh"] 38 | -------------------------------------------------------------------------------- /images/php/func-tests/5.4/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.4-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y zip libaio1 \ 6 | && rm -r /var/lib/apt/lists/* 7 | 8 | # Oracle instantclient 9 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 10 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 11 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 12 | 13 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 14 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 15 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 16 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 17 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 18 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 19 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 20 | 21 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 22 | && docker-php-ext-install oci8 \ 23 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 24 | && docker-php-ext-install pdo_oci 25 | -------------------------------------------------------------------------------- /images/php/func-tests/5.5/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.5-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y zip libaio1 \ 6 | && rm -r /var/lib/apt/lists/* 7 | 8 | # Oracle instantclient 9 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 10 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 11 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 12 | 13 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 14 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 15 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 16 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 17 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 18 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 19 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 20 | 21 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 22 | && docker-php-ext-install oci8 \ 23 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 24 | && docker-php-ext-install pdo_oci 25 | -------------------------------------------------------------------------------- /images/php/func-tests/5.6/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-5.6-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y zip libaio1 \ 6 | && rm -r /var/lib/apt/lists/* 7 | 8 | # Oracle instantclient 9 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 10 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 11 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 12 | 13 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 14 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 15 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 16 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 17 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 18 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 19 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 20 | 21 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 22 | && docker-php-ext-install oci8 \ 23 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 24 | && docker-php-ext-install pdo_oci 25 | -------------------------------------------------------------------------------- /images/php/func-tests/7.0/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM phpbb/php-ft-7.0-base:latest 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN apt-get update \ 5 | && apt-get install -y zip libaio1 \ 6 | && rm -r /var/lib/apt/lists/* 7 | 8 | # Oracle instantclient 9 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 10 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 11 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 12 | 13 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 14 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 15 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 16 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 17 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 18 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 19 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 20 | 21 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 22 | && docker-php-ext-install oci8 \ 23 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 24 | && docker-php-ext-install pdo_oci 25 | -------------------------------------------------------------------------------- /images/bamboo/agent/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM java:8-jdk 2 | MAINTAINER Tristan Darricau 3 | 4 | ENV DEBIAN_FRONTEND noninteractive 5 | 6 | RUN addgroup --system atlassian --uid 1100 7 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 8 | 9 | # Let's start with some basic stuff. 10 | RUN apt-get update -qq && apt-get install -qqy \ 11 | apt-transport-https \ 12 | ca-certificates \ 13 | curl \ 14 | lxc \ 15 | iptables 16 | 17 | # Install Docker from Docker Inc. repositories. 18 | RUN curl -sSL https://get.docker.com/ | sh 19 | 20 | ADD wrapdocker /usr/local/bin/wrapdocker 21 | RUN chmod +x /usr/local/bin/wrapdocker 22 | VOLUME /var/lib/docker 23 | 24 | # Make sure that the "atlassian" user from atlassian's image is part of the "docker" 25 | # group. Needed to access the docker daemon's unix socket. 26 | RUN usermod -a -G docker atlassian 27 | 28 | # place the bamboo slave startup script into the container 29 | RUN mkdir /bamboo 30 | ADD https://bamboo.phpbb.com/agentServer/agentInstaller/atlassian-bamboo-agent-installer-5.8.1.jar /bamboo/atlassian-bamboo-agent-installer.jar 31 | ADD bamboo-agent-startup.sh /bamboo/ 32 | ADD run-agent.sh /bamboo/ 33 | RUN chmod 755 /bamboo/run-agent.sh /bamboo/bamboo-agent-startup.sh /bamboo/atlassian-bamboo-agent-installer.jar 34 | RUN chown -R atlassian:atlassian /bamboo/ 35 | 36 | CMD ["/bamboo/bamboo-agent-startup.sh"] 37 | 38 | -------------------------------------------------------------------------------- /images/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | build_image() { 4 | echo -e "\e[0;32mBuilding $1 with $2\e[0m" 5 | 6 | if [[ ! $DOCKER_BUILD_DRYRUN == 1 ]] 7 | then 8 | log=$(docker build -t "$1" "$2") 9 | res=$? 10 | else 11 | res=0 12 | fi 13 | 14 | return $res 15 | } 16 | 17 | # Build an image if it doesn't already exists 18 | 19 | # Usage: One argument with the image name (with its tag) followed by a space and the build file 20 | # example: "phpbb/php-ft-5.4-postgres:1 php/unit-tests/5.4/postgres/" 21 | 22 | if [[ -z $1 ]] 23 | then 24 | exit 25 | fi 26 | 27 | if [[ $1 == \;* ]] 28 | then 29 | echo -e "\e[0;34mIgnore $1\e[0m" 30 | exit 31 | fi 32 | 33 | arr=($1) 34 | image=${arr[0]} 35 | buildfile=${arr[1]} 36 | 37 | arr=(${image//:/ }) 38 | image=${arr[0]} 39 | tag=${arr[1]} 40 | 41 | # Has the required tag already been built? 42 | if [[ -z $tag ]] 43 | then 44 | build_image "$image" "$buildfile" 45 | res=$? 46 | else 47 | new=$(docker images|grep "$image"'[[:space:]]*'"$tag") 48 | 49 | # Has the required tag already been pushed? 50 | if [[ -z $new || $DOCKER_BUILD_FORCE == 1 ]] 51 | then 52 | build_image "$image:$tag" "$buildfile" 53 | build_image "$image:latest" "$buildfile" 54 | res=$? 55 | else 56 | echo -e "\e[0;33mSkip $image:$tag\e[0m" 57 | res=0 58 | fi 59 | fi 60 | 61 | if [[ ! $res == 0 ]] 62 | then 63 | echo -e $log 64 | fi 65 | exit $res 66 | 67 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.4/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.4 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y zip libaio1 \ 9 | && rm -r /var/lib/apt/lists/* 10 | 11 | # Oracle instantclient 12 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 13 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 14 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 15 | 16 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 17 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 18 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 19 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 20 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 21 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 22 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 23 | 24 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 25 | && docker-php-ext-install oci8 \ 26 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 27 | && docker-php-ext-install pdo_oci 28 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.5/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.5 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y zip libaio1 \ 9 | && rm -r /var/lib/apt/lists/* 10 | 11 | # Oracle instantclient 12 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 13 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 14 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 15 | 16 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 17 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 18 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 19 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 20 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 21 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 22 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 23 | 24 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 25 | && docker-php-ext-install oci8 \ 26 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 27 | && docker-php-ext-install pdo_oci 28 | -------------------------------------------------------------------------------- /images/php/unit-tests/5.6/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:5.6 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y zip libaio1 \ 9 | && rm -r /var/lib/apt/lists/* 10 | 11 | # Oracle instantclient 12 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 13 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 14 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 15 | 16 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 17 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 18 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 19 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 20 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 21 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 22 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 23 | 24 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 25 | && docker-php-ext-install oci8 \ 26 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 27 | && docker-php-ext-install pdo_oci 28 | -------------------------------------------------------------------------------- /images/php/unit-tests/7.0/oracle/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:7.0 2 | MAINTAINER Tristan Darricau 3 | 4 | RUN addgroup --system atlassian --uid 1100 5 | RUN adduser --system --no-create-home --disabled-login --ingroup atlassian --uid 1100 atlassian 6 | 7 | RUN apt-get update \ 8 | && apt-get install -y zip libaio1 \ 9 | && rm -r /var/lib/apt/lists/* 10 | 11 | # Oracle instantclient 12 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 13 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 14 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 15 | 16 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip 17 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip 18 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ && rm /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip 19 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 20 | RUN ln -s /usr/local/instantclient /usr/local/instantclient/12.1 21 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 22 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 23 | 24 | RUN docker-php-ext-configure oci8 --with-oci8=instantclient,/usr/local/instantclient \ 25 | && docker-php-ext-install oci8 \ 26 | && docker-php-ext-configure pdo_oci --with-pdo-oci=instantclient,/usr/local/instantclient,12.1 \ 27 | && docker-php-ext-install pdo_oci 28 | -------------------------------------------------------------------------------- /images/container-list: -------------------------------------------------------------------------------- 1 | ;phpbb/bamboo-agent-docker bamboo/agent/docker 2 | ;phpbb/bamboo-agent-state bamboo/agent/state 3 | 4 | ;phpbb/php-ut-5.4-sqlite:3 php/unit-tests/5.4/sqlite/ 5 | ;phpbb/php-ut-5.5-sqlite:3 php/unit-tests/5.5/sqlite/ 6 | ;phpbb/php-ut-5.6-sqlite:3 php/unit-tests/5.6/sqlite/ 7 | ;phpbb/php-ut-7.0-sqlite:3 php/unit-tests/7.0/sqlite/ 8 | 9 | ;phpbb/php-ut-5.4-mysql:3 php/unit-tests/5.4/mysql/ 10 | ;phpbb/php-ut-5.5-mysql:3 php/unit-tests/5.5/mysql/ 11 | ;phpbb/php-ut-5.6-mysql:3 php/unit-tests/5.6/mysql/ 12 | ;phpbb/php-ut-7.0-mysql:3 php/unit-tests/7.0/mysql/ 13 | 14 | ;phpbb/php-ut-5.4-postgres:3 php/unit-tests/5.4/postgres/ 15 | ;phpbb/php-ut-5.5-postgres:3 php/unit-tests/5.5/postgres/ 16 | ;phpbb/php-ut-5.6-postgres:3 php/unit-tests/5.6/postgres/ 17 | ;phpbb/php-ut-7.0-postgres:3 php/unit-tests/7.0/postgres/ 18 | 19 | ;phpbb/php-ft-5.4-base:3 php/func-tests/5.4/base/ 20 | ;phpbb/php-ft-5.5-base:3 php/func-tests/5.5/base/ 21 | ;phpbb/php-ft-5.6-base:3 php/func-tests/5.6/base/ 22 | ;phpbb/php-ft-7.0-base:3 php/func-tests/7.0/base/ 23 | 24 | ;phpbb/php-ft-5.4-sqlite:3 php/func-tests/5.4/sqlite/ 25 | ;phpbb/php-ft-5.5-sqlite:3 php/func-tests/5.5/sqlite/ 26 | ;phpbb/php-ft-5.6-sqlite:3 php/func-tests/5.6/sqlite/ 27 | ;phpbb/php-ft-7.0-sqlite:3 php/func-tests/7.0/sqlite/ 28 | 29 | ;phpbb/php-ft-5.4-mysql:3 php/func-tests/5.4/mysql/ 30 | ;phpbb/php-ft-5.5-mysql:3 php/func-tests/5.5/mysql/ 31 | ;phpbb/php-ft-5.6-mysql:3 php/func-tests/5.6/mysql/ 32 | ;phpbb/php-ft-7.0-mysql:3 php/func-tests/7.0/mysql/ 33 | 34 | ;phpbb/php-ft-5.4-postgres:3 php/func-tests/5.4/postgres/ 35 | ;phpbb/php-ft-5.5-postgres:3 php/func-tests/5.5/postgres/ 36 | ;phpbb/php-ft-5.6-postgres:3 php/func-tests/5.6/postgres/ 37 | ;phpbb/php-ft-7.0-postgres:3 php/func-tests/7.0/postgres/ 38 | 39 | ;nicofuma/php-ut-5.4-oracle:3 php/unit-tests/5.4/oracle/ 40 | ;nicofuma/php-ut-5.5-oracle:3 php/unit-tests/5.5/oracle/ 41 | ;nicofuma/php-ut-5.6-oracle:3 php/unit-tests/5.6/oracle/ 42 | ;nicofuma/php-ut-7.0-oracle:3 php/unit-tests/7.0/oracle/ 43 | 44 | ;nicofuma/php-ft-5.4-oracle:3 php/func-tests/5.4/oracle/ 45 | ;nicofuma/php-ft-5.5-oracle:3 php/func-tests/5.5/oracle/ 46 | ;nicofuma/php-ft-5.6-oracle:3 php/func-tests/5.6/oracle/ 47 | ;nicofuma/php-ft-7.0-oracle:3 php/func-tests/7.0/oracle/ 48 | 49 | ;phpbb/build:3 php/build/ 50 | -------------------------------------------------------------------------------- /images/bamboo/agent/docker/wrapdocker: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # DinD: a wrapper script which allows docker to be run inside a docker container. 5 | # Original version by Jerome Petazzoni 6 | # See the blog post: https://blog.docker.com/2013/09/docker-can-now-run-within-docker/ 7 | # 8 | # This script should be executed inside a docker container in privilieged mode 9 | # ('docker run --privileged', introduced in docker 0.6). 10 | 11 | # Usage: dind CMD [ARG...] 12 | 13 | # apparmor sucks and Docker needs to know that it's in a container (c) @tianon 14 | export container=docker 15 | 16 | # as of docker 1.8, cgroups will be mounted in the container 17 | if ! mountpoint -q /sys/fs/cgroup; then 18 | 19 | # First, make sure that cgroups are mounted correctly. 20 | CGROUP=/cgroup 21 | 22 | mkdir -p "$CGROUP" 23 | 24 | if ! mountpoint -q "$CGROUP"; then 25 | mount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup $CGROUP || { 26 | echo >&2 'Could not make a tmpfs mount. Did you use --privileged?' 27 | exit 1 28 | } 29 | fi 30 | 31 | # Mount the cgroup hierarchies exactly as they are in the parent system. 32 | for HIER in $(cut -d: -f2 /proc/1/cgroup); do 33 | 34 | SUBSYSTEMS="${HIER%name=*}" 35 | 36 | # If cgroup hierarchy is named(mounted with "-o name=foo") we 37 | # need to mount it in $CGROUP/foo to create exect same 38 | # directoryes as on host. Else we need to mount it as is e.g. 39 | # "subsys1,subsys2" if it has two subsystems 40 | 41 | # Named, control-less cgroups are mounted with "-o name=foo" 42 | # (and appear as such under /proc//cgroup) but are usually 43 | # mounted on a directory named "foo" (without the "name=" prefix). 44 | # Systemd and OpenRC (and possibly others) both create such a 45 | # cgroup. So just mount them on directory $CGROUP/foo. 46 | 47 | OHIER=$HIER 48 | HIER="${HIER#*name=}" 49 | 50 | mkdir -p "$CGROUP/$HIER" 51 | 52 | if ! mountpoint -q "$CGROUP/$HIER"; then 53 | mount -n -t cgroup -o "$OHIER" cgroup "$CGROUP/$HIER" 54 | fi 55 | 56 | # Likewise, on at least one system, it has been reported that 57 | # systemd would mount the CPU and CPU accounting controllers 58 | # (respectively "cpu" and "cpuacct") with "-o cpuacct,cpu" 59 | # but on a directory called "cpu,cpuacct" (note the inversion 60 | # in the order of the groups). This tries to work around it. 61 | 62 | if [ "$HIER" = 'cpuacct,cpu' ]; then 63 | ln -s "$HIER" "$CGROUP/cpu,cpuacct" 64 | fi 65 | 66 | # If hierarchy has multiple subsystems, in /proc//cgroup 67 | # we will see ":subsys1,subsys2,subsys3,name=foo:" substring, 68 | # we need to mount it to "$CGROUP/foo" and if there were no 69 | # name to "$CGROUP/subsys1,subsys2,subsys3", so we must create 70 | # symlinks for docker daemon to find these subsystems: 71 | # ln -s $CGROUP/foo $CGROUP/subsys1 72 | # ln -s $CGROUP/subsys1,subsys2,subsys3 $CGROUP/subsys1 73 | 74 | if [ "$SUBSYSTEMS" != "${SUBSYSTEMS//,/ }" ]; then 75 | SUBSYSTEMS="${SUBSYSTEMS//,/ }" 76 | for SUBSYS in $SUBSYSTEMS 77 | do 78 | ln -s "$CGROUP/$HIER" "$CGROUP/$SUBSYS" 79 | done 80 | fi 81 | done 82 | fi 83 | 84 | if [ -d /sys/kernel/security ] && ! mountpoint -q /sys/kernel/security; then 85 | mount -t securityfs none /sys/kernel/security || { 86 | echo >&2 'Could not mount /sys/kernel/security.' 87 | echo >&2 'AppArmor detection and --privileged mode might break.' 88 | } 89 | fi 90 | 91 | # Note: as I write those lines, the LXC userland tools cannot setup 92 | # a "sub-container" properly if the "devices" cgroup is not in its 93 | # own hierarchy. Let's detect this and issue a warning. 94 | if ! grep -q :devices: /proc/1/cgroup; then 95 | echo >&2 'WARNING: the "devices" cgroup should be in its own hierarchy.' 96 | fi 97 | if ! grep -qw devices /proc/1/cgroup; then 98 | echo >&2 'WARNING: it looks like the "devices" cgroup is not mounted.' 99 | fi 100 | 101 | # Mount /tmp (conditionally) 102 | if ! mountpoint -q /tmp; then 103 | mount -t tmpfs none /tmp 104 | fi 105 | 106 | if [ $# -gt 0 ]; then 107 | exec "$@" 108 | fi 109 | 110 | echo >&2 'ERROR: No command specified.' 111 | echo >&2 'You probably want to run hack/make.sh, or maybe a shell?' 112 | --------------------------------------------------------------------------------