Build docker image from environment.yml

Hello,

I am newbie to creating docker images :slight_smile: I have the following Dockerfile:

FROM continuumio/miniconda3

COPY environment.yml /
RUN conda env create -f environment.yml && conda clean -a
RUN echo "source activate env" > ~/.bashrc
ENV PATH /opt/miniconda/envs/env/bin:$PATH

and the following environment.yml

name: env
channels:
  - anaconda
  - conda-forge
dependencies:
  - samtools=1.9
  - pigz=2.4

I run

docker build -t test .

However, the Docker build “Sending build context to Docker daemon is very big (~80GB). Any ideas/suggestions why the docker image is so big would be highly appreciated.

Use this link: [How to avoid transferring everything as build context]

1 Like