From 344f4ce32fbb531623a5e3d40550ba79c62027af Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Mon, 22 Apr 2024 11:50:48 -0500 Subject: [PATCH] - Cleanud up dockerfile. --- Dockerfile | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index 23ddcff..4f231c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,3 @@ -ARG HOME='/home/worker' -ARG BUILD=${HOME}/build - FROM opendap/besd:3.21.0-272 AS base HEALTHCHECK NONE @@ -10,35 +7,33 @@ RUN yum -y update && \ RUN yum install -y nano && \ yum install -y wget -ARG HOME -WORKDIR $HOME +ARG HOME='/home/worker' +WORKDIR ${HOME} RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py310_23.10.0-1-Linux-x86_64.sh -O miniconda.sh && \ bash miniconda.sh -b -p ${HOME}/miniconda && \ - rm miniconda.sh && \ - source ${HOME}/miniconda/bin/activate && \ - conda init --all -ENV PATH="${HOME}/miniconda/bin:${PATH}" + rm miniconda.sh -ARG BUILD +ENV PATH="${HOME}/miniconda/bin:${PATH}" +ARG BUILD=${HOME}/build WORKDIR ${BUILD} -COPY setup.py requirements*txt ./ -RUN pip install -r requirements.txt -COPY dmrpp_generator ./dmrpp_generator -COPY generate_dmrpp.py ./generate_dmrpp.py -COPY tests ./tests - -RUN python setup.py install - RUN pip install ipython && \ pip install pytest && \ pip install coverage -RUN coverage run -m pytest -RUN coverage report -RUN coverage lcov -o ./coverage/lcov.info -RUN rm -rf tests .coverage .pytest_cache -ARG BUILD +COPY setup.py requirements*txt generate_dmrpp.py ./ +COPY dmrpp_generator ./dmrpp_generator/ +COPY tests ./tests/ +RUN pip install -r requirements.txt && \ + python setup.py install + +RUN coverage run -m pytest && \ + coverage report && \ + coverage lcov -o ./coverage/lcov.info && \ + rm -rf tests .coverage .pytest_cache && \ + pip uninstall pytest -y && \ + pip uninstall coverage -y + RUN pip install --target $BUILD awslambdaric COPY site.conf /etc/bes/