Adding stuff to the image is easy. Here is an example.
First you give the official image another tag:
docker tag fenicsproject/stable-ppa:latest myfenics
Then you start a container, say named "temp", from the image "myfenics":
docker run --name=temp myfenics
Then install the software you want in the container. For example,
sudo apt-get update
sudo apt-get install python-matplotlib
exit
Then commit the changes back to the image:
docker commit temp myfenics
After this, all containers started from "myfenics" will have matplotlib
installed. You can even push your customized image "myfenics" to Dockerhub
to share with other people.
One way to think about docker is this: the minimal os environment along
with the application (Ubuntu+FFniCS in this case) is packed in an image,
which is a git-like file system. You can either start a container from an
image to make changes to the image (as above), or you can start a container
with access to user data through shared folders and use FEniCS as an
application. You can even run
docker history fenicsproject/stable-ppa:latest
to see all the steps we took to make that image. Each step has a hash,
which is basically a git commit. The image names like
"fenicsproject/stable-ppa:latest" are just tags in git. So all basic stuff
you can do in git you can do to docker images as well (except for merge,
which is not implemented yet).
On Sat, May 30, 2015 at 4:55 PM, Johan Hake <[email protected]> wrote:
> Nice!
>
> How easy would it be to change the environment, and add other software to
> the images?
>
> Johan
>
> On Sat, May 30, 2015 at 1:20 PM, Garth N. Wells <[email protected]> wrote:
>
>> A collection of images for running FEniCS inside Linux containers
>> using Docker (https://www.docker.com/) are now available. With a
>> container image, a FEniCS environment can be quickly and reliably
>> created with just one line. There is no performance difference with
>> respect to a 'native installation' (including when running in parallel
>> with MPI), and once downloaded a container can be launched
>> near-instantly. This provides immediately a shell within which FEniCS
>> code can be executed. In many cases, the Docker images will be faster
>> than user installations on the same system as we have tuned the builds
>> for performance.
>>
>> Once you have Docker installed, getting a FEniCS release environment
>> is as simple as:
>>
>> docker run -t -i fenicsproject/stable-ppa:latest
>>
>> To launch the container and mount the current directory inside the
>> container:
>>
>> docker run -v $(pwd)/build:/home/fenics/build -t -i
>> fenicsproject/stable-ppa:latest
>>
>> You can launch as many containers as you wish.
>>
>> The images are built and hosted on Dockerhub at
>> https://registry.hub.docker.com/repos/fenicsproject/. At present we
>> provide three images:
>>
>> 1. A release environment based in the latest release PPA
>> (https://registry.hub.docker.com/u/fenicsproject/stable-ppa/)
>>
>> 2. A pre-built, recent development version snapshot of FEniCS
>> (https://registry.hub.docker.com/u/fenicsproject/dev/), which includes
>> a script for updating the FEniCS build.
>>
>> 3. A FEniCS development environment image, which provides all the
>> necessary FEniCS dependencies but does not provide FEniCS. This image
>> is suitable for developers who wish to build the FEniCS libraries
>> themselves. It provides a script for building or updating a
>> development version of FEniCS. Image (2) builds on this image.
>>
>> Instructions for launching the containers are provided on the
>> Dockerhub page for each image.
>>
>> The images are based on a Ubuntu 14.04 LTS image that is tailored to
>> Docker containers. For those who are interested, the Dockerfiles are
>> hosted at https://github.com/fenics/docker, and new images are
>> automatically built on Dockerhub when a change is pushed to the
>> repository that holds the Dockerfiles. The Dockerfiles provide
>> advanced users with a guide on how to create customised FEniCS
>> environments.
>>
>> There will be live demonstrations of Docker use at the FEniCS'15
>> Workshop. We'll be refining guides to using Linux containers with
>> FEniCS as we get feedback. Please send any feedback on the containers
>> to [email protected], and register any issues at
>> https://github.com/FEniCS/docker/issues.
>>
>> Garth, Jack and Larry
>> _______________________________________________
>> fenics mailing list
>> [email protected]
>> http://fenicsproject.org/mailman/listinfo/fenics
>>
>
>
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
>
>
--
Lizao (Larry) Li
Univeristy of Minnesota
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics