Commit ac36ba26 authored by Matthieu Muffato's avatar Matthieu Muffato Committed by ens-bwalts
Browse files

Install the dependencies of *all* eHive versions instead of relying on the...

Install the dependencies of *all* eHive versions instead of relying on the ones installed in the base image (which is only the latest version)
parent a38b739f
...@@ -7,25 +7,29 @@ ...@@ -7,25 +7,29 @@
FROM ensemblorg/ensembl-hive FROM ensemblorg/ensembl-hive
# Install known guiHive Perl dependencies with apt (faster than CPAN) # Install common utilities and known guiHive Perl dependencies with apt (faster than CPAN)
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \ RUN apt-get update -y \
&& apt-get install libhtml-parser-perl libhtml-template-perl libjson-perl libjson-pp-perl liburi-perl -y \ && apt-get install curl git libhtml-parser-perl libhtml-template-perl libjson-perl libjson-pp-perl liburi-perl -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG DEPLOY_LOCATION=/repo/guiHive ARG DEPLOY_LOCATION=/repo/guiHive
RUN curl -L https://raw.githubusercontent.com/Ensembl/guiHive/server/guihive-deploy.sh | bash RUN curl -L https://raw.githubusercontent.com/Ensembl/guiHive/server/guihive-deploy.sh | bash
# Wrap the cpan and compilation phases with apt-get install/purge to keep the image small # Install guiHive and eHive Perl dependencies (across *all* versions) using eHive's helper scripts
ARG EHIVE_TMP_CHECKOUT=$DEPLOY_LOCATION/ensembl-hive-tmp
RUN mkdir $EHIVE_TMP_CHECKOUT \
&& GIT_DIR=$DEPLOY_LOCATION/clones/ensembl-hive GIT_WORK_TREE=$EHIVE_TMP_CHECKOUT git checkout -qf master \
&& $EHIVE_TMP_CHECKOUT/docker/setup_cpan.Ubuntu-16.04.sh $DEPLOY_LOCATION $DEPLOY_LOCATION/ensembl-hive/* \
&& rm -rf $EHIVE_TMP_CHECKOUT
# Wrap the compilation phase with apt-get install/purge to keep the image small
RUN buildDeps=' \ RUN buildDeps=' \
golang \ golang \
cpanminus \
build-essential \
' \ ' \
&& apt-get update -y \ && apt-get update -y \
&& apt-get install -y $buildDeps \ && apt-get install -y $buildDeps \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& cpanm --installdeps --with-recommends $DEPLOY_LOCATION \
&& cd $DEPLOY_LOCATION/server && go build \ && cd $DEPLOY_LOCATION/server && go build \
&& apt-get purge -y --auto-remove $buildDeps && apt-get purge -y --auto-remove $buildDeps
......
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