How to install packages with miniconda in Dockerfile?

前端 未结 1 1717
-上瘾入骨i
-上瘾入骨i 2021-02-13 18:03

I have a simple Dockerfile:

FROM ubuntu:18.04

RUN apt-get update

RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*

RUN wget \\
    https://re         


        
1条回答
  •  失恋的感觉
    2021-02-13 18:20

    This will work using ARG and ENV:

    FROM ubuntu:18.04
    ENV PATH="/root/miniconda3/bin:${PATH}"
    ARG PATH="/root/miniconda3/bin:${PATH}"
    RUN apt-get update
    
    RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*
    
    RUN wget \
        https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
        && mkdir /root/.conda \
        && bash Miniconda3-latest-Linux-x86_64.sh -b \
        && rm -f Miniconda3-latest-Linux-x86_64.sh 
    RUN conda --version
    

    0 讨论(0)
提交回复
热议问题