View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003741 | OpenFOAM | Bug | public | 2021-10-20 12:12 | 2021-12-21 10:28 |
Reporter | rasunag27 | Assigned To | chris | ||
Priority | urgent | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 18.04 |
Summary | 0003741: /bin/sh:1:icoFoam: not found error | ||||
Description | Dear all, I have installed openfoam v5 from dockerfile with using ubuntu 18.04 as base image and used CMD command to check the execution of the software. The software command works perfectly from inside the container. Firstly, I had used `RUN sh -c` command to install the software and also to source it as RUN sh -c 'echo "source /opt/openfoam5/etc/bashrc" >> ~/.bashrc' . The CMD command inside dockerfile is `CMD icoFoam` . Since, the error was showing /bin/sh:icoFoam not found after running Dockerfile, I gave the RUN command as described in this link: https://superuser.com/questions/1634933/bin-sh-1-my-command-not-found as, RUN /bin/bash -c . But, the error still persists as /bin/sh:1:icoFoam not found . Below is my dockerfile extracted from CFDEngine blog. Dockerfile: # Start from the official Ubuntu Bionic (18.04 LTS) image FROM ubuntu:18.04 # Install any extra things we might need RUN apt-get update \ && apt-get install -y \ vim \ ssh \ sudo \ wget \ software-properties-common ;\ rm -rf /var/lib/apt/lists/* # Create a new user called foam RUN useradd --user-group --create-home --shell /bin/bash niramai ;\ echo "niramai ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers # Install OpenFOAM v5 (without ParaView) # including configuring for use by user=foam # plus an extra environment variable to make OpenMPI play nice RUN /bin/bash -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" ;\ add-apt-repository http://dl.openfoam.org/ubuntu ;\ apt-get update ;\ apt-get install -y --no-install-recommends openfoam5 ;\ rm -rf /var/lib/apt/lists/* ;\ echo "source /opt/openfoam5/etc/bashrc" >> ~niramai/.bashrc ;\ echo "export OMPI_MCA_btl_vader_single_copy_mechanism=none" >> ~niramai/.bashrc RUN chmod -R 777 /bin # set the default container user to foam USER niramai CMD icoFoam # Added additionally so as to execute from terminal | ||||
Steps To Reproduce | docker build -t <name:tag> . docker run -it <name:tag> | ||||
Tags | No tags attached. | ||||
|
We - The OpenFOAM Foundation - have our own Docker build for OpenFOAM v5 described here: https://openfoam.org/download/5-0-linux/ Your issue is not related to any instructions we provide. |