diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c6d3f81c2840aef96294ea6c4296050c99eb5f88..1a85282a7642169c9f1862463cba19768019ded2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,12 +2,21 @@ image: eicweb.phy.anl.gov:4567/containers/image_recipes/root_base:latest
 
 stages:
   - build
+  - build_docker
   - build_sing_img
   - data_replays
   - data_tests
 
-hcana_docker:
+hcana_build:
+  image: eicweb.phy.anl.gov:4567/containers/image_recipes/root_base:latest
   stage: build  
+  tags: 
+     - eic0 docker
+  script:
+     - bash bin/compile
+
+hcana_docker:
+  stage: build_docker  
   tags: 
      - eic0 docker
   script:
diff --git a/bin/compile b/bin/compile
new file mode 100755
index 0000000000000000000000000000000000000000..e98eff7b95b594e46b9a5b9a175c4be2843b3e1b
--- /dev/null
+++ b/bin/compile
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -o nounset
+set -o errexit
+
+export PYTHONPATH=/usr/local/lib:$PYTHONPATH  
+export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH  
+export PATH=/usr/local/bin:$PATH  
+source /usr/local/bin/thisroot.sh 
+cd /tmp 
+git clone https://github.com/fmtlib/fmt.git && cd fmt 
+git checkout 6.2.1 && mkdir /tmp/build && cd /tmp/build 
+cmake -DBUILD_SHARED_LIBS=TRUE ../fmt 
+make -j20 install 
+cd /tmp && rm -r /tmp/build && rm -r /tmp/fmt 
+cd /tmp  
+git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/hallac_evio.git 
+mkdir hallac_evio/build && cd hallac_evio/build  
+cmake ../.  && make -j20 && make install 
+cd /tmp && rm -rf hallac_evio 
+cd /tmp  
+export PYTHONPATH=/usr/local/lib:$PYTHONPATH  
+export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH  
+export PATH=/usr/local/bin:$PATH  
+git clone --depth 1 https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/analyzer.git 
+mkdir analyzer/build && cd analyzer/build   
+cmake ../.  && make -j20 VERBOSE=1 && make install 
+cd /tmp  && rm -rf analyzer 
+export PYTHONPATH=/usr/local/lib:$PYTHONPATH  
+export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH  
+export PATH=/usr/local/bin:$PATH  
+source /usr/local/bin/thisroot.sh 
+git clone https://eicweb.phy.anl.gov/jlab/hallc/analyzer_software/hcana.git 
+mkdir hcana/build && cd hcana/build  
+git pull 
+cmake ../.  && make -j20 VERBOSE=1 && make install  
+cd /tmp && rm -rf hcana 
+