From 6d7d279bf8c3dd4a0748ec873daea432a4a6cfbb Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Mon, 31 Aug 2020 09:42:40 -0600 Subject: [PATCH] Add development container target --- Dockerfile | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 547ea665..1a4e4487 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ ARG FROM_IMAGE=usgs/centos:latest -FROM ${FROM_IMAGE} +FROM ${FROM_IMAGE} as conda LABEL maintainer="Jeremy Fee <jmfee@usgs.gov>" ARG GIT_BRANCH_NAME=none @@ -35,6 +35,29 @@ RUN conda config --set ssl_verify $SSL_CERT_FILE \ && yum install -y which \ && yum clean all + +################################################################################ +## Development image + +# build by running +# docker build -t geomag-algorithms-development --target development . + +FROM conda as development + +# install dependencies via pipenv +WORKDIR /geomag-algorithms +COPY Pipfile /geomag-algorithms +RUN pipenv --site-packages install --dev --skip-lock + +# copy library (ignores set in .dockerignore) +COPY . /geomag-algorithms + + +################################################################################ +## Production image + +FROM conda + RUN useradd \ -c 'Docker image user' \ -m \ -- GitLab