Public Repository

Last pushed: 2 years ago
Short Description
Neuro Info eXchange (
Full Description


This is the docker repos for the NIX (Neuroscience Information eXchange) format developed by the German Neuroinformatics Node.


Three ways can be chosen

1) Go with the latest nix image and get it with docker pull and develop your project inside. (only good enough for some testing)

2) Write your own Dockerfile based on the latest nix image to build an own image with your project.

3) Write your own Dockerfile based on the latest-onbuild nix image: this will assume that in your docker build dir there are all your project files and a and Using the latest-onbuild will automatically run the following steps:

a) create dir `/usr/src/nix` inside the image
b) copy `` to `/usr/src/nix` inside the image and execute it
c) copy all available files to `/usr/src/nix`
d) copy `` to `/usr/src/nix` inside the image and execute it

Thus you must supply and should install all dependencies while should build and install your nix project. The great advantage of this is that your Dockerfile can look as simple as FROM nix:latest-onbuild. Complete example below.


How to build your own NIX project using latest-onbuild - assume you have a project with the following files:


FROM balint42/nix:latest-onbuild


CC      = g++
CFLAGS  = -std=c++11
# IMPORTANT: the "-lnix" option is needed to compile !!!
LIBS    = nix
RM      = rm -f

default: all
all: mynix
mynix: main.cpp
    $(CC) $(CFLAGS) main.cpp -o mynix -l$(LIBS)
clean veryclean:
    $(RM) mynix

apt-get update  # To get the latest package lists
apt-get install wget -y # if your project would need wget

ln -s ./mynix ~/bin


#include <nix.hpp>
#include <iostream>

int main(void) {
    nix::File file = nix::File::open("foo.h5", nix::FileMode::Overwrite);
    nix::Section section = file.createSection("foo_section", "metadata");
    std::cout << "created section " << << std::endl;
    nix::Block block = file.createBlock("foo_block", "dataset");
    std::cout << "created block " << << std::endl;
    return 0;

Now in your project dir simply run sudo docker build -t myuser/mynix.

That's it! Now you have a docker image myuser/mynix which contains your project under /usr/src/nix and nix under /opt/nix.

Docker Pull Command

Comments (0)