Giter Site home page Giter Site logo

cdash-docker's Introduction

cdash-docker

Deploy a cdash instance with docker and zero guess work!

How?

Build with docker:

docker build -t "kitware/cdash-docker" .

...or build with docker-compose

docker-compose build

Deploy example application using docker-compose

See docker-compose.yml for an example of how to deploy using the cdash-docker image. Add your own customizations, or deploy the example as-is!

docker-compose up -d

Check on your instance's status:

docker-compose ps

Once docker reports that cdash is "healthy", you're good to go! Browse your cdash instance at localhost:8080.

Container Variables

CDASH_CONFIG

The contents, verbatim, to be included in the local CDash configuration file (/var/www/cdash/config/config.local.php), excluding the initial <?php line. When running the container on the command line, consider writing the contents to a local file:

$EDITOR local-configuration.php
...
docker run \
    -e CDASH_CONFIG="$( cat local-configuration.php )" \
    ... \
    kitware/cdash-docker

Note: When setting this variable in a docker-compose file, take care to ensure that dollar signs ($) are properly escaped. Otherwise, the resulting contents of the file may be subject to variable interpolation.

Example:

...

  # wrong: this string syntax is subject to interpolation
  # The contents will depend on the CDASH_DB_... variables as they are set at
  # container creation time
  CDASH_CONFIG: |
    $CDASH_DB_HOST = 'mysql';
    $CDASH_DB_NAME = 'cdash';
    $CDASH_DB_TYPE = 'mysql';
    ...

  # correct: use $$ to represent a literal `$`
  CDASH_CONFIG: |
    $$CDASH_DB_HOST = 'mysql';
    $$CDASH_DB_NAME = 'cdash';
    $$CDASH_DB_TYPE = 'mysql';
    ...

...

CDASH_ROOT_ADMIN_PASS

The password for the "root" administrator user, or the initial administrator user that is created during the CDash install.php procedure. This is the only variable that is strictly required.

The initial "root" administrator user is managed by the container. The container uses this user account to log in and provision the service as well as set up static users. This account is not meant to be used by an actual administrator. To set up a predefined administrator account, see CDASH_STATIC_USERS.

CDASH_ROOT_ADMIN_NEW_PASS

Set this variable to change the password for the root administrator account. If set, the container will attempt to use this password when logging in as the root account. If the login is unsuccessful, it will try logging in using the (presumably former) password set in CDASH_ROOT_ADMIN_PASS. If this second attempt is successful, it will update the root account so that its password is reset to the value of CDASH_ROOT_ADMIN_NEW_PASS.

CDASH_STATIC_USERS

A multiline value representing the set of user accounts to prepare as part of the container's initialization process. This value may contain comments that start with # and lines with only white space; these parts of the text are ignored.

Each user account identified in the set is created using the information provided. If the account already exists, its details are modified to match the information provided. Existing accounts that are not identified in the set are not modified.

The representation for each user account begins with a line of the following form:

[USER|ADMIN|DELETE] EMAIL PASSWORD [NEW_PASSWORD]

Where EMAIL is the user's email address, PASSWORD is the user's password, and NEW_PASSWORD (if provided) is the user's new password. If NEW_PASSWORD is provided, the user's password is updated using the same procedure as that with CDASH_ROOT_ADMIN_NEW_PASS.

This entry line may begin with an additional token. A token of USER indicates that the entry is for a normal (non-admin) account. A token of ADMIN indicates that the entry is for an administrator account. A token of DELETE indicates that any account with the given email (if found) should be deleted. If no such token is provided, USER is assumed by default.

An entry may include an additional, optional line. Such lines must be of the following form:

[INFO] FIRST_NAME [LAST_NAME] [INSTITUTION]

Where FIRST_NAME is the user's first name, LAST_NAME is the user's last name, and INSTITUTION is the name of the institution with which the user is affiliated.

This second line may begin with an additional token with the value INFO, which may be provided to distinguish this second line from a line representing a new user account, in case the user's first name contains an @ character. For such unusual cases, include this token so that the name is not mistaken for an email address.

Note: for DELETE entries, all that is needed is the account's email address, and for either PASSWORD or NEW_PASSWORD (if provided) to be set to the password needed to log in as that user. You may provide additional information for the account, but it will not be used since the account will be deleted.

Note: for tokens with spaces, wrap them in quotes (").

cdash-docker's People

Contributors

opadron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cdash-docker's Issues

docker-compose build failed

It looks like docker-compose is not able to reconstruct the images any more and failed during script due to missing packages.

$ docker-compose build
...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
(23) Failed writing body
Error executing command, exiting
ERROR: Service 'cdash' failed to build: The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_6.x | bash                        && apt-get install -y git libbz2-dev libfreetype6-dev libjpeg62-turbo-dev         libmcrypt-dev libpng12-dev libpq-dev libxslt-dev libxss1 nodejs unzip wget     zip                                                                         && docker-php-ext-configure pgsql --with-pgs

docker build does not work

After replacing libpng12-dev by libpng-dev in the Dockerfile, I get the following error when I try to docker-build the image:

...

running: find "/tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5" | xargs ls -dils
   18192    0 drwxr-xr-x. 3 root root      17 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5
46375466    0 drwxr-xr-x. 3 root root      19 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr
50429481    0 drwxr-xr-x. 3 root root      17 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local
54607111    0 drwxr-xr-x. 3 root root      17 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local/lib
58842935    0 drwxr-xr-x. 3 root root      24 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local/lib/php
63365695    0 drwxr-xr-x. 3 root root      39 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local/lib/php/extensions
   18193    0 drwxr-xr-x. 2 root root      23 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local/lib/php/extensions/no-debug-non-zts-20151012
   18194 1400 -rwxr-xr-x. 1 root root 1431400 Oct  8 13:01 /tmp/pear/temp/pear-build-defaultuseref2WdN/install-xdebug-2.5.5/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so

Build process completed successfully
Installing '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so'
install ok: channel://pecl.php.net/xdebug-2.5.5
configuration option "php_ini" is not set to php.ini location
You should add "zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so" to php.ini
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  269k  100  269k    0     0  1155k      0 --:--:-- --:--:-- --:--:-- 1156k
-: FAILED
sha384sum: WARNING: 1 computed checksum did NOT match
The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_6.x | bash                        && apt-get install -y git libbz2-dev libfreetype6-dev libjpeg62-turbo-dev         libmcrypt-dev libpng-dev libpq-dev libxslt-dev libxss1 nodejs unzip wget     zip                                                                         && docker-php-ext-configure pgsql --with-pgsql=/usr/local/pgsql                && docker-php-ext-configure gd --with-freetype-dir=/usr/include/                                              --with-jpeg-dir=/usr/include/                   && docker-php-ext-install -j$(nproc) bcmath bz2 gd pdo_mysql pdo_pgsql xsl     && pecl install xdebug-2.5.5                                                   && docker-php-ext-enable xdebug                                                && (                                                                                echo '544e09ee 996cdf60 ece3804a bc52599c'                                   ; echo '22b1f40f 4323403c 44d44fdf dd586475'                                   ; echo 'ca9813a8 58088ffb c1f233e9 b180f061'                                   ) | tr -d "\\n " | sed 's/$/  -/g' > checksum                               && curl -o - 'https://getcomposer.org/installer'                               |  tee composer-setup.php                                                      |  sha384sum -c checksum                                                       && rm checksum                                                                 || ( rm -f checksum composer-setup.php && false )                              && php composer-setup.php --install-dir=/usr/local/bin --filename=composer     && php -r "unlink('composer-setup.php');"                                      && composer self-update --no-interaction' returned a non-zero code: 1

Looks like it is related to this step in the Dockerfile.

docker-build issue: "Package 'libpng12-dev' has no installation candidate"

There's an error when performing docker build, seemingly by a package which has been removed:

$ docker build -t "kitware/cdash-docker" .

Sending build context to Docker daemon  119.8kB
Step 1/10 : FROM php:7.0-apache
 ---> aa67a9c9814f
Step 2/10 : LABEL maintainer="Omar Padron <[email protected]>"
 ---> Using cache
 ---> 2b951716908f
Step 3/10 : RUN curl -sL https://deb.nodesource.com/setup_6.x | bash                        && apt-get install -y git libbz2-dev libfreetype6-dev libjpeg62-turbo-dev         libmcrypt-dev libpng12-dev libpq-dev libxslt-dev libxss1 nodejs unzip wget     zip                                                                         && docker-php-ext-configure pgsql --with-pgsql=/usr/local/pgsql                && docker-php-ext-configure gd --with-freetype-dir=/usr/include/                                              --with-jpeg-dir=/usr/include/                   && docker-php-ext-install -j$(nproc) bcmath bz2 gd pdo_mysql pdo_pgsql xsl     && pecl install xdebug-2.5.5                                                   && docker-php-ext-enable xdebug                                                && (                                                                                echo '544e09ee 996cdf60 ece3804a bc52599c'                                   ; echo '22b1f40f 4323403c 44d44fdf dd586475'                                   ; echo 'ca9813a8 58088ffb c1f233e9 b180f061'                                   ) | tr -d "\\n " | sed 's/$/  -/g' > checksum                               && curl -o - 'https://getcomposer.org/installer'                               |  tee composer-setup.php                                                      |  sha384sum -c checksum                                                       && rm checksum                                                                 || ( rm -f checksum composer-setup.php && false )                              && php composer-setup.php --install-dir=/usr/local/bin --filename=composer     && php -r "unlink('composer-setup.php');"                                      && composer self-update --no-interaction
 ---> Running in 6a9ca735facb

## Installing the NodeSource Node.js 6.x LTS Boron repo...


## Populating apt-get cache...

+ apt-get update
Get:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:3 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 Packages [501 kB]
Ign:2 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:5 http://cdn-fastly.deb.debian.org/debian stretch Release [118 kB]
Get:6 http://cdn-fastly.deb.debian.org/debian stretch-updates/main amd64 Packages [27.4 kB]
Get:7 http://cdn-fastly.deb.debian.org/debian stretch Release.gpg [2434 B]
Get:8 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 Packages [7082 kB]
Fetched 7917 kB in 3s (2372 kB/s)
Reading package lists...

## Installing packages required for setup: apt-transport-https lsb-release gnupg...

+ apt-get install -y apt-transport-https lsb-release gnupg > /dev/null 2>&1

## Confirming "stretch" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_6.x/dists/stretch/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
Warning: apt-key output should not be parsed (stdout is not a terminal)
OK

## Creating apt sources list file for the NodeSource Node.js 6.x LTS Boron repo...

+ echo 'deb https://deb.nodesource.com/node_6.x stretch main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_6.x stretch main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 http://security-cdn.debian.org/debian-security stretch/updates InRelease
Get:2 https://deb.nodesource.com/node_6.x stretch InRelease [4608 B]
Ign:3 http://cdn-fastly.deb.debian.org/debian stretch InRelease
Get:4 https://deb.nodesource.com/node_6.x stretch/main amd64 Packages [1007 B]
Hit:5 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
Hit:6 http://cdn-fastly.deb.debian.org/debian stretch Release
Fetched 5615 B in 0s (11.8 kB/s)
Reading package lists...

## Run `sudo apt-get install -y nodejs` to install Node.js 6.x LTS Boron and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn


Reading package lists...
Building dependency tree...
Reading state information...
Package libpng12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libpng12-dev' has no installation candidate
The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_6.x | bash                        && apt-get install -y git libbz2-dev libfreetype6-dev libjpeg62-turbo-dev         libmcrypt-dev libpng12-dev libpq-dev libxslt-dev libxss1 nodejs unzip wget     zip                                                                         && docker-php-ext-configure pgsql --with-pgsql=/usr/local/pgsql                && docker-php-ext-configure gd --with-freetype-dir=/usr/include/                                              --with-jpeg-dir=/usr/include/                   && docker-php-ext-install -j$(nproc) bcmath bz2 gd pdo_mysql pdo_pgsql xsl     && pecl install xdebug-2.5.5                                                   && docker-php-ext-enable xdebug                                                && (                                                                                echo '544e09ee 996cdf60 ece3804a bc52599c'                                   ; echo '22b1f40f 4323403c 44d44fdf dd586475'                                   ; echo 'ca9813a8 58088ffb c1f233e9 b180f061'                                   ) | tr -d "\\n " | sed 's/$/  -/g' > checksum                               && curl -o - 'https://getcomposer.org/installer'                               |  tee composer-setup.php                                                      |  sha384sum -c checksum                                                       && rm checksum                                                                 || ( rm -f checksum composer-setup.php && false )                              && php composer-setup.php --install-dir=/usr/local/bin --filename=composer     && php -r "unlink('composer-setup.php');"                                      && composer self-update --no-interaction' returned a non-zero code: 1

PHP 7.4.30 vulnerabilities

Our CDash server is using kitware/cdash:latest docker image that comes with PHP 7.4.30.

Our security tool reported the following:

  • The version of PHP installed on the remote host is prior to 7.4.32. It is, therefore, affected by multiple vulnerabilities as referenced in the Version 7.4.32 advisory.

Is there a plan to upgrade the docker image with a more recent PHP version ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.