I am attempting to build a Docker image for a software package installed using Conda. The image needs to be built using the linux/amd64 architecture.
The build process takes excessively long (over 19 hours) and does not complete. How can I optimize the build process and ensure it successfully creates the Docker image?
Here is my Dockerfile and the build command I am using:
FROM continuumio/miniconda
WORKDIR /app
RUN git clone https://github.com/zstephens/telogator2.git
SHELL ["/bin/bash", "-c"]
# Create the conda environment
RUN conda env create -f telogator2/conda_env_telogator2.yaml
# Install additional tools via conda in one RUN layer for efficiency
RUN source activate telogator2 && \
conda install -y -c bioconda winnowmap muscle && \
conda clean -afy
# Ensure the conda environment is activated in future commands
ENV PATH="/opt/conda/envs/telogator2/bin:$PATH"
# Set entry point
ENTRYPOINT ["python", "telogator2/telogator2.py"]
docker buildx build --platform linux/amd64 -t telogator2:amd64 .