|
[Sponsors] |
[OpenFOAM.com] IcoFoam not found in docker when executed from outside |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 14, 2021, 09:29 |
IcoFoam not found in docker when executed from outside
|
#1 |
Member
Sunag R A
Join Date: Jul 2019
Location: Bangalore, India
Posts: 82
Rep Power: 6 |
Dear all,
I wanted to run OpenFOAM simulation inside docker container, for this I have built the docker image from dockerfile. The dockerfile has Openfoam 5 installation along with necessary requirements. 1. When the image is built, OpenFOAM works perfectly when I enter into the container and test with "icoFoam" command. 2. But, when I exec it with "CMD" inside dockerfile, it throws an error stating "icoFoam not found". 3. All installation done with new user and not in root. Below is the dockerfile content. Code:
################################################################################### USER root # Install OpenFOAM5.0, paraviewopenfoam54 and PyFoam # Add dl.openfoam.org to the list of software repositories RUN sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" # Install the dependancies (Can also have a requirements file and build from there) RUN apt-get install software-properties-common -y RUN add-apt-repository http://dl.openfoam.org/ubuntu RUN apt-get install apt-transport-https -y RUN apt-get update -y RUN apt-get -y install openfoam5 # New user creation RUN groupadd -r sunag && useradd -m -r -g sunag sunag # Source bashrc RUN echo "source /opt/openfoam5/etc/bashrc" >> /home/sunag/.bashrc USER sunag # Install pip packages for specific user RUN python -m pip install --user numpy scipy pandas scikit-image opencv-python PyFoam open3d numpy-stl gunicorn WORKDIR /home CMD icoFoam So, what am I missing here or what work around needs to be done? Hope, it is understood. Regards, Sunag R A. |
|
Tags |
cmd, docker, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[RapidCFD] Discussion thread on how to install and use RapidCFD | newoscar | OpenFOAM Community Contributions | 88 | May 17, 2024 09:39 |
error in fireFoam, when running the case wallFireSpread2D | zhoubiao1088 | OpenFOAM Running, Solving & CFD | 9 | February 1, 2018 18:45 |
[Other] Compiling hacFoam (Ubuntu 10.04)(OF2.0.0)(LAMMPS13Jul2010)) | Henrik_E | OpenFOAM Installation | 3 | September 29, 2016 16:16 |
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 | flakid | OpenFOAM Installation | 16 | December 28, 2010 08:48 |
critical error during installation of openfoam | Fabio88 | OpenFOAM Installation | 21 | June 2, 2010 03:01 |