I'm trying to install some packages on the OpenFOAM docker-machine image which is based on boot2docker. When running the uname -a
command I get the info:
Linux default 4.4.111-boot2docker #1 SMP Thu Jan 11 16:25:31 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
In this page it has been explained that the boot2docker distro is based on the Tiny Core Linux
distro so to install a package one must:
tce-load -w -i packagename.tcz
to installI followed these steps to install git. but I get the error:
bash: tce-load: command not found
I searched and as explained here apparently the official repository is offline. There a list of mirrors is provided. But I have no idea how I can install a package from those mirrors!
P.S. Alternatively here a bizarre answer by the OP have been upvoted while it is not clear what he/she means by running boot2docker ssh
I would appreciate if you could help me know what is the problem and how I can solve it.
Update 10-12-2021:
Now I have a better understanding of why the uname -a
returns what it does. Basically, all docker containers share the same kernel as the host Linux OS (reference). To know what is the container's OS, a safe option is the cat /etc/issue
(reference). Moreover, it seems like that some of the new "official" OpenFOAM containers are based on Ubuntu, without any admin passwords. So one can just install new packages with apt
/apt-get
/...
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:
Using the command 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!