anchor.diff:  # Updating genome informations from UCSC
   #RUN export GALAXY=$GALAXY_ROOT && sh ./cron/updateucsc.sh.sample
   
  -ENV GALAXY_CONFIG_DATABASE_CONNECTION=postgresql://galaxy:galaxy@localhost:5432/galaxy?client_encoding=utf8 \
  -GALAXY_CONFIG_ADMIN_USERS=admin@galaxy.org \
  -GALAXY_CONFIG_MASTER_API_KEY=HSNiugRFvgT574F43jZ7N9F3 \
  -GALAXY_CONFIG_BRAND="Galaxy Docker Build" \
  -GALAXY_CONFIG_STATIC_ENABLED=False \
  -GALAXY_CONFIG_JOB_WORKING_DIRECTORY=$EXPORT_DIR/galaxy-central/database/job_working_directory \
  +ENV GALAXY_CONFIG_JOB_WORKING_DIRECTORY=$EXPORT_DIR/galaxy-central/database/job_working_directory \
   GALAXY_CONFIG_FILE_PATH=$EXPORT_DIR/galaxy-central/database/files \
   GALAXY_CONFIG_NEW_FILE_PATH=$EXPORT_DIR/galaxy-central/database/files \
   GALAXY_CONFIG_TEMPLATE_CACHE_PATH=$EXPORT_DIR/galaxy-central/database/compiled_templates \
  
positive.code: ADD GalaxyDocker.png $GALAXY_CONFIG_DIR/web/welcome_image.png
  ADD welcome.html $GALAXY_CONFIG_DIR/web/welcome.html
  
  RUN ./scripts/common_startup.sh \
      && export PATH=GALAXY_CONDA_PREFIX/bin/:$PATH \
      && . $GALAXY_VIRTUAL_ENV/bin/activate \
      && python ./scripts/manage_tool_dependencies.py -c "$GALAXY_CONFIG_FILE" init_if_needed \
      # cleanup dance
      && find /galaxy-central/ -name '*.pyc' -delete \
      && find /usr/lib/ -name '*.pyc' -delete \
      && find /tool_deps/_conda/ -name '*.pyc' -delete \
      && find /galaxy_venv -name '*.pyc' -delete \
      && rm -rf /tmp/* /galaxy-central/client/node_modules/ /galaxy_venv/src/ /home/galaxy/.cache/ /home/galaxy/.npm
  
      # Install all required Node dependencies. This is required to get proxy support to work for Interactive Environments
      #cd $GALAXY_ROOT/lib/galaxy/web/proxy/js && \
      #npm install && \
      #rm -rf ~/.cache/ /galaxy-central/client/node_modules/
  
  # change the default location of shed_tools to be ../shed_tools
  RUN sed -i 's|database|..|' $GALAXY_ROOT/config/shed_tool_conf.xml
  
  # Switch back to User root
  USER root
  
  # Include all needed scripts from the host
  ADD ./setup_postgresql.py /usr/local/bin/setup_postgresql.py
  
  # Configure PostgreSQL
  # 1. Remove all old configuration
  # 2. Create DB-user 'galaxy' with password 'galaxy' in database 'galaxy'
  # 3. Create Galaxy Admin User 'admin@galaxy.org' with password 'admin' and API key 'admin'
  
  
  RUN rm $PG_DATA_DIR_DEFAULT -rf && \
      python /usr/local/bin/setup_postgresql.py --dbuser galaxy --dbpassword galaxy --db-name galaxy --dbpath $PG_DATA_DIR_DEFAULT && \
      service postgresql start && \
      . $GALAXY_VIRTUAL_ENV/bin/activate && \
      sh create_db.sh -c "$GALAXY_CONFIG_FILE" && \
      python /usr/local/bin/create_galaxy_user.py --user $GALAXY_DEFAULT_ADMIN_USER --password $GALAXY_DEFAULT_ADMIN_PASSWORD -c $GALAXY_CONFIG_FILE --key $GALAXY_DEFAULT_ADMIN_KEY \
      && service postgresql stop \
      # cleanup dance
      && find /galaxy-central/ -name '*.pyc' -delete \
      && find /usr/lib/ -name '*.pyc' -delete \
      && find /tool_deps/_conda/ -name '*.pyc' -delete \
      && find /galaxy_venv -name '*.pyc' -delete \
      && rm -rf /root/.cache/ /galaxy-central/client/node_modules/ /galaxy_venv/src/ /home/galaxy/.cache/
  
  
  # Activate additional Tool Sheds
  
negative.code:     && chown $GALAXY_USER:$GALAXY_USER -R /tool_deps/ /etc/profile.d/conda.sh \
      && conda clean --packages -t -i \
      # cleanup dance
      && find $GALAXY_ROOT -name '*.pyc' -delete | true \
      && find /usr/lib/ -name '*.pyc' -delete | true \
      && find $GALAXY_CONDA_PREFIX/ -name '*.pyc' -delete | true \
      && find $GALAXY_VIRTUAL_ENV -name '*.pyc' -delete | true \
      && rm -rf /tmp/* /root/.cache/ /var/cache/* $GALAXY_ROOT/client/node_modules/ $GALAXY_VIRTUAL_ENV/src/ /home/galaxy/.cache/ /home/galaxy/.npm
  
  
  RUN cp $GALAXY_HOME/.bashrc ~/
  RUN mkdir $GALAXY_ROOT \
      && curl -L -s $GALAXY_REPO/archive/$GALAXY_RELEASE.tar.gz | tar xzf - --strip-components=1 -C $GALAXY_ROOT \
      && PATH=$GALAXY_CONDA_PREFIX/bin/:$PATH virtualenv $GALAXY_VIRTUAL_ENV \
      && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_VIRTUAL_ENV \
      && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_ROOT \
      # Setup Galaxy configuration files.
      && mkdir -p $GALAXY_CONFIG_DIR $GALAXY_CONFIG_DIR/web \
      && chown -R $GALAXY_USER:$GALAXY_USER $GALAXY_CONFIG_DIR \
      && rm -rf /tmp/* /root/.cache/ /var/cache/* $GALAXY_ROOT/client/node_modules/ $GALAXY_VIRTUAL_ENV/src/ /home/galaxy/.cache/ /home/galaxy/.npm \
      && su $GALAXY_USER -c "cp $GALAXY_ROOT/config/galaxy.yml.sample $GALAXY_CONFIG_FILE"
  
  ADD ./reports_wsgi.ini.sample $GALAXY_CONFIG_DIR/reports_wsgi.ini
  