Hello,
I have installed docker on the server but my cd Desktop and shared all are empty.
Can you please suggest something?
Hello,
I have installed docker on the server but my cd Desktop and shared all are empty.
Can you please suggest something?
You need to mount volumes to share data between a docker container and your local system, see: Use volumes | Docker Documentation
"docker run -d \
–name devtest
–mount source=myvol2,target=/app
nginx:latest"
for this command I am getting the error as
unknown flag: --mount
Can you please suggest what can be done?
Now it is giving the error as
“unknown shorthand flag: ‘d’ in -d”
Sir, I have already visited this. It didn’t help
Sir, I have run these commands but the shared file is still empty.
cd ~/demo/python/documented/poisson
python3 demo_poisson.py
fenics@8204a0961c39:~$ ls
WELCOME demo fenics.env.conf local shared
fenics@8204a0961c39:~$ cd shared
fenics@8204a0961c39:~/shared$ ls
fenics@8204a0961c39:~/shared$
It shows nothing
You need to show the full docker run ...
command you are using, as this will explain what you are sharing or not.
docker run -ti Quay
Welcome to FEniCS/stable!
This image provides a full-featured and optimized build of the stable
release of FEniCS.
To help you get started this image contains a number of demo
programs. Explore the demos by entering the ‘demo’ directory, for
example:
cd ~/demo/python/documented/poisson
python3 demo_poisson.py
fenics@8204a0961c39:~$ ls
WELCOME demo fenics.env.conf local shared
fenics@8204a0961c39:~$ cd shared
fenics@8204a0961c39:~/shared$ ls
fenics@8204a0961c39:~/shared$
docker run -ti Quay
You need to at least add -v
, i.e.: docker run -ti -v /path/you/would/like/to/share:/fenics/shared quay.io/fenicsproject/stable:latest
docker run -ti -v /root:/fenics/shared Quay
Welcome to FEniCS/stable!
This image provides a full-featured and optimized build of the stable
release of FEniCS.
To help you get started this image contains a number of demo
programs. Explore the demos by entering the ‘demo’ directory, for
example:
cd ~/demo/python/documented/poisson
python3 demo_poisson.py
fenics@bae661e3d81b:~$ ls
WELCOME demo fenics.env.conf local shared
fenics@bae661e3d81b:~$ cd shared
fenics@bae661e3d81b:~/shared$ ls
fenics@bae661e3d81b:~/shared$
root@localhost:~# ls
BDF1-1D-FEM.ipynb docker-desktop-4.12.0-amd64.deb
BDF1-1D-FEM.py docker-runc
BDF2-2D-Check-Freefem.ipynb get-docker.sh
Desktop intel
anaconda-ks.cfg l_HPCKit_p_2022.2.0.191_offline
backup.tar l_HPCKit_p_2022.2.0.191_offline.sh
dev
Sir, this is .py file I want in that shared list
Please do echo $PWD
at this location. This is what you should add as the volume to mount, see for instance:
root@localhost:~# ls
BDF1-1D-FEM.ipynb docker-desktop-4.12.0-amd64.deb
BDF1-1D-FEM.py docker-runc
BDF2-2D-Check-Freefem.ipynb get-docker.sh
Desktop intel
anaconda-ks.cfg l_HPCKit_p_2022.2.0.191_offline
backup.tar l_HPCKit_p_2022.2.0.191_offline.sh
dev
root@localhost:~# echo $PWD
/root
root@localhost:~# docker run -ti --rm -v $(pwd):/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable
# FEniCS stable version image
Welcome to FEniCS/stable!
This image provides a full-featured and optimized build of the stable
release of FEniCS.
To help you get started this image contains a number of demo
programs. Explore the demos by entering the 'demo' directory, for
example:
cd ~/demo/python/documented/poisson
python3 demo_poisson.py
fenics@c062bf65c7b9:~/shared$ ls
ls: cannot open directory '.': Permission denied
fenics@c062bf65c7b9:~/shared$
Still not running
You are getting another error message, which is related with the fact that you are trying to share the path/root/
on your system.
I would suggest sharing a sub folder, like
/root/Desktop
docker run -ti --rm -v /root/Desktop:/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable
# FEniCS stable version image
Welcome to FEniCS/stable!
This image provides a full-featured and optimized build of the stable
release of FEniCS.
To help you get started this image contains a number of demo
programs. Explore the demos by entering the 'demo' directory, for
example:
cd ~/demo/python/documented/poisson
python3 demo_poisson.py
fenics@a279c98c6610:~/shared$ ls
fenics@a279c98c6610:~/shared$