diff --git a/Dockerfile b/Dockerfile index a2350cf2ac3f54bbd816e6f9026aa4b35b2e795a..76df4b17d8f96b9c4f2c51ad7b372c8f2a55bf64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,16 @@ -FROM debian:jessie +FROM usgs/hazdev-base-images:latest-centos MAINTAINER Jeremy Fee <jmfee@usgs.gov> LABEL usgs.geomag-algorithms.version=0.4.0 -# update os -RUN apt-get update --fix-missing && \ - apt-get install -y --no-install-recommends \ + +# install conda dependencies +RUN yum install -y \ bzip2 \ - ca-certificates \ - curl \ gcc \ - libcurl4-gnutls-dev \ - libglib2.0-0 \ - libgnutls28-dev \ - libsm6 \ - libxext6 \ - libxrender1 && \ - apt-get clean + libcurl-devel \ + && \ + yum clean all # install conda @@ -32,19 +26,16 @@ RUN echo 'export PATH=/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ COPY . /geomag-algorithms -# configure DOI SSL intercept certificate -# (required when building image from within DOI network) -RUN mkdir -p /usr/local/share/ca-certificates && \ - cp /geomag-algorithms/etc/DOIRootCA2.crt /usr/local/share/ca-certificates/. && \ - update-ca-certificates && \ - conda config --set ssl_verify /etc/ssl/certs/ca-certificates.crt - - # install algorithms and dependencies via conda -RUN conda config --add channels obspy && \ +RUN conda config --set ssl_verify $SSL_CERT_FILE && \ + conda config --add channels obspy && \ conda install --yes jupyter obspy && \ conda clean -i -l -t -y && \ - pip install pycurl && \ + # build pycurl with SFTP support + export PIP_CERT=$SSL_CERT_FILE && \ + export PYCURL_SSL_LIBRARY=nss && \ + pip install pycurl && \ + # end build pycurl pip install /geomag-algorithms && \ useradd \ -c 'Docker image user' \