This repository contains dockerfiles used to test different deployment strategies for applications currently being hosted at NCI. Because CentOS 6.7 is currently being used to host several applications we have attempted to create a minimal enviroment based on the centos:6.7 image during the first phase of this project. We are currently investigating using the centos:7 baseline image as the repositories offer more up-to-date support for application dependencies.
The following tools are supported by this study:
- Absolute Risk Calculator
- Age Period Cohort Tool
- Biomarker Tools Suite
- COMETS Analytics
- Crosstalk Analysis Tool
- Glossary of Cancer Terms API
- JPSurv Analysis Tool
- LDlink
- Lung Cancer Screening Tool
- NCIDose Tool
- NCI eConsent Tool
- Pathway Analysis Tool
We are also investigating best practices for deploying the following open-source projects:
####Deploying Applications The images generated from these dockerfiles only contain the dependencies required to run the application - this approach allows for application code to be mounted within a container at runtime, eliminating the need to rebuild the image on every change.
The cbiitss repository provides application-specific images and instructions for deploying each application.
#####Base Images
Default image | File | Description |
---|---|---|
cbiitss/python27:c6 | python-base.c6.dockerfile | CentOS 6 / Python 2.7.12 |
cbiitss/r_base:c6 | r-base.c6.dockerfile | CentOS 6 / Python 2.7.12 / R 3.3 |
cbiitss/python27:c7 | python-base.c7.dockerfile | CentOS 7 / Python 2.7.5 (system default) |
cbiitss/r_base:c7 | r-base.c7.dockerfile | CentOS 7 / Python 2.7.5 / R 3.3 |
#####Application Images (CentOS 6)
Image Name | File | Description |
---|---|---|
cbiitss/absoluterisk:c6 | absoluteRisk.c6.dockerfile | CentOS 6 / Absolute Risk Calculator |
cbiitss/apc:c6 | apc.c6.dockerfile | CentOS 6 / Age Period Cohort Tool |
cbiitss/biomarkertools:c6 | biomarkerTools.c6.dockerfile | CentOS 6 / Biomarker Tools Suite |
cbiitss/cancerterms:c6 | CancerTerms.c6.dockerfile | CentOS 6 / Cancer Terms API |
cbiitss/comets:c6 | comets.c6.dockerfile | CentOS 6 / COMETS |
cbiitss/econsent:c6 | econsent.c6.dockerfile | CentOS 6 / eConsent |
cbiitss/jpsurv:c6 | jpsurv.c6.dockerfile | CentOS 6 / jpsurv |
cbiitss/ldlink:c6 | LDlink.c6.dockerfile | CentOS 6 / LDlink |
cbiitss/lungcancerscreening:c6 | lungCancerScreening.c6.dockerfile | CentOS 6 / Lung Cancer Screening Tool |
cbiitss/ncidose:c6 | NCIDose.c6.dockerfile | CentOS 6 / NCI Dose |
cbiitss/pathway:c6 | pathway.c6.dockerfile | CentOS 6 / Pathway Analysis Tool |
#####Application Images (CentOS 7)
Image Name | File | Description |
---|---|---|
cbiitss/absoluterisk:c7 | absoluteRisk.c7.dockerfile | CentOS 7 / Absolute Risk Calculator |
cbiitss/apc:c7 | apc.c7.dockerfile | CentOS 7 / Age Period Cohort Tool |
cbiitss/biomarkertools:c7 | biomarkerTools.c7.dockerfile | CentOS 7 / Biomarker Tools Suite |
cbiitss/cancerterms:c7 | CancerTerms.c7.dockerfile | CentOS 7 / Cancer Terms API |
cbiitss/comets:c7 | comets.c7.dockerfile | CentOS 7 / COMETS |
cbiitss/econsent:c7 | econsent.c7.dockerfile | CentOS 7 / eConsent |
cbiitss/jpsurv:c7 | jpsurv.c7.dockerfile | CentOS 7 / jpsurv |
cbiitss/ldlink:c7 | LDlink.c7.dockerfile | CentOS 7 / LDlink |
cbiitss/lungcancerscreening:c7 | lungCancerScreening.c7.dockerfile | CentOS 7 / Lung Cancer Screening Tool |
cbiitss/ncidose:c7 | NCIDose.c7.dockerfile | CentOS 7 / NCI Dose |
cbiitss/pathway:c7 | pathway.c7.dockerfile | CentOS 7 / Pathway Analysis Tool |
To start an application, clone the application source and mount it within the container in the docker run command. This is an example for the Age Period Cohort Tool.
# Create a deployment directory for the application
mkdir -p /local/apc/app /local/apc/logs
# Clone the age period cohort repository and copy it to the deployment directory
git clone https://github.com/CBIIT/nci-webtools-dceg-age-period-cohort.git /tmp/age-period-cohort
cp -r /tmp/age-period-cohort/apc/* /local/apc/app/
# Since the application also requires resources found in a different repository,
# we should should clone it and copy its contents to the deployment directory
git clone https://github.com/CBIIT/nci-analysis-tools-web-presence.git /tmp/web-presence
cp -r /tmp/web-presence/common/ /local/apc/app/
# Start the application
docker rm --force apc
docker run \
--detach \
--name apc \
--publish 8000:8000 \
--user `id -u`:`id -g` \
--volume /etc/localtime:/etc/localtime:ro \
--volume /local/apc/:/deploy/ \
cbiitss/apc
# View the running container
docker ps
# Navigate to http://localhost:8000 to see the application in action!