Turning ripples into waves

Notes on using docker (to build IOOS binstar channel)

This post contains my notes on how to use docker. The goal is to use a docker image to speedup Linux32 and Linus64 builds for the IOOS channel.



sudo systemctl start docker
sudo systemctl enable docker
sudo /usr/sbin/usermod -a -G docker $USER

No sudo

sudo groupadd docker
sudo gpasswd -a ${USER} docker
sudo service docker restart

Login (docker-hub)

docker login

Manage images

Using pelson's Centos image with conda+obvious-ci

docker pull pelson/conda64_obvious_ci

List your images

docker images

Remove an image

docker rmi <image>

Using the image

Run something once

docker run pelson/conda64_obvious_ci /bin/echo 'Hello world'

Open a terminal inside the container

docker run -i -t pelson/conda64_obvious_ci /bin/bash

Start terminal and mout a directory at image's /home

docker run -it --rm -v $(pwd):/home/ pelson/conda64_obvious_ci /bin/bash
cd home

Note: The --rm does not save the container state. All changes will be deleted once you leave the image!

Inside the container

To build all packages at IOOS we need:

yum install -y patch
yum install -y file

# Qt, matplotlib deps, vispy
yum install -y libXext
yum install -y libSM
yum install -y libXrender
yum install -y fontconfig
yum install -y mesa-libGL

# octant
yum install -y gcc-gfortran

# udunits2
yum install -y expat-devel

# rasterio
yum install -y compat-expat1.i686

# nco
yum install -y bison
yum install -y byacc
yum install -y flex
yum install -y gsl-devel
yum install -y antlr

Updating and configuring conda

conda update --all
conda config --add channels ioos


binstar login
conda config --set binstar_upload yes

Firing up obvious-ci ./ ioos --channel main
In [2]:

This post was written as an IPython notebook. It is available for download or as a static html.

Creative Commons License
python4oceanographers by Filipe Fernandes is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at