wiki:DcacheDockerImages
Last modified 3 years ago Last modified on 12/16/15 14:33:22

Docker Images

We created a couple of Dockerfiles to create Docker images for dCache. These Dockerfiles are managed in the github repository dcache-docker. The repository has two directories in root:

  • dcache contains subdirectories for the specialised images
  • scripts contains scripts to create the images

The dcache directory has multiple directories with the data for the different dCache images (e.g. pool, nfs) and three base images, namely deps, db and dcache. The deps image contains dependencies needed to build and run dCache, the db image contains Postgres with the dCache databases and dcache contains an installed but still unconfigured dCache. All other images are based on the dcache image.

The dcache image defines a couple of triggers and adds some basic scripts for setting up the sub images:

  • run-dcache.sh is supposed to be the entry-point for all dCache images. It executes all scripts in the

/init-dcache/ directory. The dcache image adds two scripts that will thus also be run for all sub images: 00-replace-env.sh and 99-database-update.sh. The first one replaces %%VAR%% style tags in the dCache configuration files with the value of environment variables - in the example above with the value of the environment variable VAR. This mechanism allows for example for domain names to be set at run time rather than at build time. The second script just runs "dcache database update".

All images are set up as automatic builds on docker hub. All, but dcache/build are triggered by the dcache/dcache-docker repository and dcache/build is triggered by pushs to the main dcache repository. Also, builds are triggered down the image dependency tree:

All functional dCache images are triggered by rebuilds of dcache/dcache, dcache/dcache is triggered by builds of dcache/build and dcache/db and dcache/build is triggered by builds of dcache/deps.

The docker hub page is https://hub.docker.com/u/dcache/