Commit 821448cc authored by Marian Heil's avatar Marian Heil

Added README

parent 0d53aaca
# Generic interface to create docker files for HEP software
This repository provides scripts to create docker files for various software
used in High Energy Physics. The docker images can be found on
https://hub.docker.com/u/maheil.
The installation scripts here are taken from
[HepSW/Install](https://gitlab.dur.scotgrid.ac.uk/hepsw/install). Any issues
with these scripts should be posted there.
## Using the scripts
Running `./setup_docker.sh MODULE_NAME` will create a Dockerfile in `build/`.
This will not automatically build the docker file, but give the corresponding
command to do so. All modules from the HepSW install are available, see
[install/config](install/config).
......@@ -30,10 +30,10 @@ mkdir -p build
cd build
cp ../Docker_generic ${MODULE_DOCKER}
sed -i -e "s TEMPLATE_PREFIX ${MODULE_PREFIX} g" ${MODULE_DOCKER} | exit 1
sed -i -e "s TEMPLATE_FOLDER ${MODULE_DIR} g" ${MODULE_DOCKER} | exit 1
sed -i -e "s TEMPLATE_NAME ${MODULE_NAME} g" ${MODULE_DOCKER} | exit 1
sed -i -e "s TEMPLATE_HEPSW_HOME ${HEPSW_HOME} g" ${MODULE_DOCKER} | exit 1
sed -i -e "s TEMPLATE_PREFIX ${MODULE_PREFIX} g" ${MODULE_DOCKER} | exit 2
sed -i -e "s TEMPLATE_FOLDER ${MODULE_DIR} g" ${MODULE_DOCKER} | exit 2
sed -i -e "s TEMPLATE_NAME ${MODULE_NAME} g" ${MODULE_DOCKER} | exit 2
sed -i -e "s TEMPLATE_HEPSW_HOME ${HEPSW_HOME} g" ${MODULE_DOCKER} | exit 2
echo "- Installation directory is set to ${HEPSW_HOME}"
if [[ ${#MODULE_DEPENDENCIES[@]} -gt 0 ]]; then
......@@ -43,14 +43,14 @@ else
base_docker=$(image_name "compiler")
fi
echo "- Using \"${base_docker}\" as base docker"
sed -i -e "s TEMPLATE_BASE ${base_docker} g" ${MODULE_DOCKER} | exit 1
sed -i -e "s TEMPLATE_BASE ${base_docker} g" ${MODULE_DOCKER} | exit 2
for dep in ${MODULE_DEPENDENCIES[@]:1}; do
declare -n dep_dir=HEPSW_${dep}_DIR
declare -n dep_name=HEPSW_${dep}_NAME
dep_docker=$(image_name ${dep_name})
echo "- Adding additional dependency \"${dep_docker}\""
sed -i -e "s#DEPENDENCIES#DEPENDENCIES\nCOPY --from=${dep_docker} ${dep_dir} ${dep_dir}#g" ${MODULE_DOCKER} | exit 1
sed -i -e "s#DEPENDENCIES#DEPENDENCIES\nCOPY --from=${dep_docker} ${dep_dir} ${dep_dir}#g" ${MODULE_DOCKER} | exit 2
done
echo "- Success! To build the docker run:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment