|
[Sponsors] |
[OpenFOAM.com] Accessing the root account via Docker |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 27, 2016, 04:47 |
Accessing the root account via Docker
|
#1 |
New Member
Join Date: Dec 2016
Posts: 6
Rep Power: 9 |
Hi,
I am having some issues trying to mount storage located outside the default workingDir path on a Windows 10 OF installation. Storage limitations prevent me from storing my project in "My Documents". In order to mount the new Virtualbox shared drive, I need to access the root account. It isn't as simple as using 'su', as I don't know the password. If I open the Virtualbox instance, it gives me a root account, I can change the password - but it doesn't affect the OF instance at all. This is obvious when listing users (cat /etc/passwd), as "ofuser" is not listed. I can see the Virtualbox share I am interested in from here. I can log into root by starting a new docker instance (docker run -i -t of_v1606plus_centos66_win /bin/bash), but these changes do not seem to apply to the current instance of OF. I can't see the Virtualbox share here. Additionally, I have tried using a Windows 10 symbolic link, but CentOS crashes complaining of too many levels of symbolic links. Is there a way of accessing the root account, or some magical way I can mount another windows partition? |
|
December 27, 2016, 15:35 |
|
#2 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10 |
Hi ,
The root password is 0fuser2016 . However you cannot mount the directory in this way. I will send detailed instruction and script tomorrow. Thanks pgh |
|
December 28, 2016, 08:50 |
|
#3 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10 |
To access other drive , new scripts is needed and which will create a new container. Please download tar file from following location .
I have attached a tar file which has 4 files in it . https://ftpbox.esi-group.com/?u=Nwpg...th=/window.tgz What you need to changed i) Open the Virtual Machine and then close the default which is running ii) Go to setting and add new drive which you want to share. As shown in attached image i shared new drive E i.e e:\ to e/ folder in virtual box . Please do same with your drive iii) Open the file of_start_container.ps1 and edit 4th line docker-machine.exe ssh default "sudo mount -t vboxsf -o uid=1000,gid=50 e/ /root/../mountedDrive (This is used by me . You need to replace e/ with your drive name (see attached image i.e for me e/ e:\ i.e e:\ is my directory which i mount) Launching and creating container. i) Click on the create_OF_plus.bat and it will create a new container Close the terminal when process end ii) Click on the startOF_plus . It will open container and now you can see two folder there workingDir_mounted and workingDir . You need to use this script to launch openfoam . You can click it multiple times and it will open the new terminal and you can work in multiple terminal with openfoam environment set. |
|
December 28, 2016, 18:36 |
|
#4 |
New Member
Join Date: Dec 2016
Posts: 6
Rep Power: 9 |
Thank you pgh - this worked perfectly!
|
|
January 30, 2017, 09:10 |
|
#5 |
Member
Chia
Join Date: Jan 2016
Location: Singapore
Posts: 30
Rep Power: 10 |
Hi pgh,
Im having the same problem, and I tried clicking the link to log in to download the file, but could not access the link due to invalid password https://ftpbox.esi-group.com/?u=Nwpg...th=/window.tgz Could you assist again, thanks in advance for any help |
|
February 2, 2017, 06:04 |
|
#6 | |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10 |
Quote:
https://ftpbox.esi-group.com/?u=AR8E...fv1606plus.rar |
||
September 26, 2021, 09:37 |
|
#7 |
New Member
Hosam Alrefaie
Join Date: Jul 2021
Posts: 24
Rep Power: 5 |
hi
how to access the folders where they have the source files of OpenFOAM in version of Windows-Docker. i want to add WSGGM model to absorptionEmission radiation submodels. I got the WSGGM model files from: https://github.com/arvindjp/OpenFOAM...rptionEmission |
|
October 9, 2021, 05:22 |
|
#8 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,714
Rep Power: 40 |
Quote:
There you have all the source code etc. However you cannot and should not be trying to add additional code into the docker image. Instead you should be taking the models that you cited and compile them as a user library. It means that you will subsequently need a "libs" entry in your controlDict later, but keeps your personal modifications outside of the OpenFOAM source tree, which means they will survive an upgrade. |
||
Tags |
mount, root, windows |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] Docker vs Not Docker v2 AND installing editors into Docker | u2berggeist | OpenFOAM Installation | 1 | July 10, 2018 02:58 |
[OpenFOAM.com] root in openfoam docker | jeremy rutman | OpenFOAM Installation | 3 | October 24, 2017 07:31 |
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker | rt08 | OpenFOAM Installation | 1 | February 28, 2016 19:00 |
Environment errors with .deb install and ubuntu 13.04 64 bit | jonathanbyrn | OpenFOAM Installation | 14 | September 26, 2013 05:22 |
missing vtf3.h BPatch.h papi.h | linch | OpenFOAM Installation | 41 | July 24, 2012 14:45 |