From a4e3359b1a72b178cff6b5bc56a5fb9ada762c28 Mon Sep 17 00:00:00 2001 From: Fab-T Date: Tue, 25 Feb 2020 10:37:08 -0500 Subject: [PATCH 1/2] update docker file to copy requirements first --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d26a78f..71b14da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,9 @@ LABEL maintainer="Ambrose J. Carr " \ software="python 3.6.2" \ description="python 3.6.2 with pysam, sctools, requests, and a basic science stack" +COPY requirements.txt . RUN pip3 install -r requirements.txt WORKDIR usr/local/bin/sctools -COPY . . - -RUN pip3 install . +COPY . . \ No newline at end of file From 66c279059f50b72018e6b5414eb5e00eec5ede99 Mon Sep 17 00:00:00 2001 From: Fab-T Date: Wed, 26 Feb 2020 09:49:54 -0500 Subject: [PATCH 2/2] modify dockerfile to use requirements and limit the scope of copy --- .dockerignore | 2 ++ Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..fceaba4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +#files ignored when building docker image +*/*/test diff --git a/Dockerfile b/Dockerfile index 71b14da..a1e41cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,4 +9,4 @@ RUN pip3 install -r requirements.txt WORKDIR usr/local/bin/sctools -COPY . . \ No newline at end of file +COPY src/sctools . \ No newline at end of file