Hi Luca! I have tried and I do not know what I am missing. I have a makefile like this
all: build build: docker build -t new-dealii . and the Dockerfile as follows $ more Dockerfile #Dockerfile FROM dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease RUN apt-get update RUN apt-get install -y vim python-pip RUN pip install --user numpy matplotlib Then I try to build and I get the same problem $ make build docker build -t new-dealii . Sending build context to Docker daemon 3.072 kB Step 1 : FROM dealii/dealii:v8.4.2-gcc-mpi-fulldepsmanual-debugrelease ---> 7e9675ba5e1e Step 2 : RUN apt-get update ---> Running in d2f2083b9e3f W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted) E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ 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? The command '/bin/sh -c apt-get update' returned a non-zero code: 100 Makefile:4: recipe for target 'build' failed make: *** [build] Error 100 Should I choose a different dealii container, or do you suggest that I should create the container from scratch (downloading the dealii, petsc, and so on and installing? Thanks! Sebas. El lunes, 20 de febrero de 2017, 12:35:50 (UTC+1), Luca Heltai escribió: > > 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 <sego...@gmail.com > <javascript:>> 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+un...@googlegroups.com <javascript:>. > 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.