Yes. You should write a Dockefile with your instructions. See, for example, the Dockefile for deal2lkit (github).
Luca > On 20 Feb 2017, at 11:58, Sebastian.Gonzalez-Pintor <segon...@gmail.com> > wrote: > > > Hello! > > I am trying with the docker containers of dealii, so I downloaded one of them > and then I ran it > > $ docker pull dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease > $ docker run -i -t dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease > > Now I want to install few things in the container that I uses to run my > program, like `vim`, or like `numpy`, > > dealii@a7af5de839fc:~$ apt-get install vim python-numpy > E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) > E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? > > and I found that I cannot install it because I am not root. Then, I can just > go out and enter as root: > > $ docker run -u 0 -i -t > dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease > root@89620dceb35a:~# apt-get install vim > root@89620dceb35a:~# apt-get install python-pip > root@89620dceb35a:~# pip install --user numpy matplotlib > > But know I want to commit this session in order to use it later with these > packages and other ones, so from a different terminal I identify the running > image and commit it > > $ docker ps > CONTAINER ID IMAGE > COMMAND CREATED STATUS PORTS > NAMES > 89620dceb35a dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease > "/bin/bash" 5 minutes ago Up 5 minutes > sharp_liskov > $ docker commit 89620dceb35a dealii/dealii-and-numpy > > > The problem is that when I save it, then it is saved as superuser, and I > cannot go back to normal user mode... > > Any work-around? > -- > The deal.II project is located at http://www.dealii.org/ > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > --- > You received this message because you are subscribed to the Google Groups > "deal.II User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to dealii+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.