我试图在the OpenFOAM docker-machine image上安装一些基于boot2docker的软件包。运行uname -a
命令时,我收到信息:
Linux默认4.4.111-boot2docker#1 SMP 1月11日16:25:31 UTC 2018 x86_64 x86_64 x86_64 GNU / Linux
在this page中已经解释过boot2docker发行版基于Tiny Core Linux
发行版,因此要安装包必须:
tce-load -w -i packagename.tcz
安装我按照以下步骤安装git。但是我得到了错误:
bash:tce-load:找不到命令
我搜索并按照here解释显然官方存储库处于脱机状态。提供了a list of mirrors。但我不知道如何从这些镜像安装包!
P.S。另外,OP的a bizarre answer已被提升,但通过运行boot2docker ssh
如果你能帮助我知道问题是什么以及我如何解决它,我将不胜感激。
答案 0 :(得分:0)
new/correct:
Thanks to Pawan Ghildiyal from ESI Group and Karen Kettle from OpenCFD Limited I found the correct solution.
It seems like the whole OpenFOAM docker image is based on CentOS
not boot2docker
and one can easily install new packages using yum
! Because the small virtual box interface that enable docker to run is named as boot2docker it returns as boot2docker
when asked by uname -a
.
you just need to use the root
user in docker terminal:
Docker QuickStart Terminal
(I'm using windows)docker start of_1712
docker exec -ti of_1712 /bin/bash
su -
and then the default password, in this case fuser2017
!yum install packageName
old/wrong:
As explained here it turns out that Docker deprecates the Boot2Docker
command line in favor of docker-machine
. So the answer provided here is also depreciated.
Solution:
docker-machine ssh machinename
(in my case machinename
is default
) connect to the docker-machine image. As explained here run the command version
and look for the package name in the right repository. in my case the version is 8.2.1
and the repository is http://repo.tinycorelinux.net/8.x/x86/tcz/
then run the command tce-load -w -i packagename.tcz
.
For some reason the official OpenFOAM_Start
batch file provided by the OpenFOAM team does not work!