Docker on Ubuntu - wyldckat/wyldckat.github.io GitHub Wiki

Table of Contents

Description

This is simply a bunch of cheat sheet notes I've been collecting on using Docker on Ubuntu 15.10.

References

Installation

As root:

  wget -qO- https://get.docker.com/ | sh

For not having to be root:

  sudo usermod -aG docker ofuser

Log out then log back in.

Testing

  docker run hello-world

Installing containers

Install Ubuntu 15.10 as a container:

  docker run -it ubuntu:15.10 bash

Install Ubuntu 14.04.4 as a container:

  docker run -it ubuntu:14.04.4 bash

Installing Ubuntu from Deb package

This won't work:

  add-apt-repository http://www.openfoam.org/download/ubuntu

Must use this:

  echo "deb http://www.openfoam.org/download/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/openfoam.list

Then:

  apt-get update
  apt-get install openfoam30

But doing the last one:

  apt-get install paraviewopenfoam44

won't do you any good, given that there is usually no X in the containers.

Installing OpenFOAM-dev and build it

No ParaView will be built... although I guess that a headless installation would be neat :)

From here: http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-dev/Ubuntu - we only need to run apt-get like this:

  apt-get update
  apt-get install wget cmake git-core build-essential binutils-dev flex bison zlib1g-dev \
  libreadline-dev libncurses-dev libopenmpi-dev openmpi-bin libboost-system-dev \
  libboost-thread-dev libgmp-dev libmpfr-dev

then the rest is the usual building strategy... well, with the exception that you don't need to download ParaView's source code, nor run makeParaView.

After the build is over, the files were stored somewhere in a container folder at /var/lib/docker/aufs.

Relaunching container after exit

  docker ps -a
  docker start CONTAINERID
  docker attach CONTAINERID
⚠️ **GitHub.com Fallback** ⚠️