3.10 Integrative examples

3.10.1 FASTQC Web Application

We work in a dummy FASTQC Web service

We place B7_input_s_chr19.fastq.gz file from available datasets in $HOME/myscratch

mkdir -p $HOME/myscratch

cp testdata/* $HOME/myscratch

cd containers/docker/fastqc_www

docker build -t fastqcwww -f Dockerfile ../../scripts/fastqc

docker run -d -v $HOME/myscratch:/scratch -p 3838:8083 --name myfastqc fastqcwww

Example query from the browser:

http://mymachine-address-here:3838/?file=B7_input_s_chr19.fastq

As commented in previous sections, the context is the place from where Docker will start the build process. Keep it in mind when defining the paths when using commands such as COPY in the recipe.
Replace your mymachine-address-here for machine provided address or 127.0.0.1/localhost in case you were trying it from your own machine.

3.10.2 Shiny Application

cd containers/docker/shiny

docker build -t shinyapp -f Dockerfile ../../scripts

docker run -d -v $(pwd)/../../scripts/shiny:/srv/shiny-server/myserver -p 3838:3838 --name myserver shinyapp

Check the result from the browser http://mymachine-address-here:3838

In the CMD execution you see the host 0.0.0.0, this a normal approach to indicate association to any IP address from the machine you launch the program. In a very machine you can have many routings and networks associated (e.g., more than one Ethernet plug)