From 3760e7e9faf234acab2033923e668ee874f09325 Mon Sep 17 00:00:00 2001 From: Matt Rendina Date: Wed, 10 Jun 2020 15:50:07 -0400 Subject: Update centos version to avoid yum errors; Update curl arguments Adjust miniconda installer URL --- Dockerfile | 16 ++++++++-------- build.sh | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 786945e..d060d33 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM centos:6.9 +FROM centos:7 # Declare build-time environment @@ -7,17 +7,16 @@ ARG MC_BASE_PYTHON=py37 ARG MC_VERSION=4.8.2 ARG MC_PLATFORM=Linux ARG MC_ARCH=x86_64 -ARG MC_URL=https://repo.continuum.io/miniconda +ARG MC_URL=https://repo.anaconda.com/miniconda # Conda root ARG CONDA_VERSION=4.8.2 ARG CONDA_BUILD_VERSION ARG CONDA_PACKAGES -# Pipeline definition +# Pipeline environment snapshot definition ARG SNAPSHOT_URL - # Declare environment ENV OPT=/opt \ HOME=/home/developer @@ -34,7 +33,8 @@ ENV PYTHONUNBUFFERED=1 \ CONDA_PACKAGES=${CONDA_PACKAGES} # Toolchain -RUN yum update -y && yum install -y \ +RUN yum update -y \ + && yum install -y \ bzip2-devel \ curl \ gcc \ @@ -63,7 +63,7 @@ RUN groupadd developer \ # Install Miniconda # Reset permissions -RUN curl -q -O ${MC_URL}/${MC_INSTALLER} \ +RUN curl -q -OSs ${MC_URL}/${MC_INSTALLER} \ && bash ${MC_INSTALLER} -b -p ${MC_PATH} \ && rm -rf ${MC_INSTALLER} \ && echo export PATH="${MC_PATH}/bin:\${PATH}" > /etc/profile.d/conda.sh \ @@ -82,8 +82,8 @@ RUN conda config --set auto_update_conda false \ conda=${CONDA_VERSION} \ git \ ${CONDA_PACKAGES} \ - && curl -LO ${SNAPSHOT_URL} \ - && conda env update -n base --file $(basename $SNAPSHOT_URL) + && curl -L -Ss ${SNAPSHOT_URL} -o ${HOME}/SNAPSHOT.yml \ + && conda env update -n base --file ${HOME}/SNAPSHOT.yml WORKDIR ${HOME} diff --git a/build.sh b/build.sh index b9b6bd2..66788d9 100755 --- a/build.sh +++ b/build.sh @@ -8,10 +8,10 @@ fi url="$2" if [[ ! $url ]]; then - echo "No spec file specified." + echo "No published snapshot URL specified." exit 1 fi docker build \ -t "astroconda/buildsys-pipeline:${tag}" \ - --build-arg PIPELINE_URL="${url}" $(pwd) + --build-arg SNAPSHOT_URL="${url}" $(pwd) -- cgit