如何在dockerfile中安装ubuntu软件包

时间:2018-08-27 13:41:42

标签: linux docker package apt

首先,我是docker的新手: 我想使用docker设置运行时环境,因为我需要安装一些Ubuntu软件包。我已经尝试过了:

#install dependencies
RUN apt-get install $(awk '{print $1'} packages.list) 

packages.list如下:

$ cat packages.list 
libpqxx-dev
libpq-dev
libcurl4-openssl-dev
libxml2-dev
libfftw3-dev
libsensors4-dev
libpython-dev
libtiff-dev
libjpeg-dev
libtbb-dev

但是当我运行docker buils -t cve时,我得到了以下内容:

Step 4/6 : RUN apt-get install $(awk '{print $1'} packages.list)
 ---> Running in 13bd28579a70
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libpqxx-dev
E: Unable to locate package libpq-dev
E: Unable to locate package libcurl4-openssl-dev
E: Unable to locate package libxml2-dev
E: Unable to locate package libfftw3-dev
E: Unable to locate package libsensors4-dev
E: Unable to locate package libpython-dev
E: Unable to locate package libtiff-dev
E: Unable to locate package libjpeg-dev
E: Unable to locate package libtbb-dev
The command '/bin/sh -c apt-get install $(awk '{print $1'} packages.list)' returned a non-zero code: 100

我如何达到要求?

0 个答案:

没有答案