uhlenheuerdotnet
programming, .NET, linux and others

Running monodevelop in a docker container

by Gregor Uhlenheuer on July 27, 2015

Especially if you are running a gentoo distribution you might have noticed that installing .NET/mono packages can be quite a hassle. I often ended up compiling by myself without using portage at all. That works but can be somewhat cumbersome to maintain and update.

Docker

Having monodevelop running inside a docker container might be just the solution you have been looking for.

This is the tiny Dockerfile I came up with:

FROM mono:4
MAINTAINER Gregor Uhlenheuer <kongo2002@gmail.com>

RUN apt-get update && \
    apt-get install -y monodevelop monodevelop-nunit && \
    rm -rf /var/lib/apt/lists/*

ENTRYPOINT [ "/usr/bin/monodevelop" ]

That’s all! Now you can go ahead and build a docker image and run it by exposing the X11 socket to your docker container:

docker build -t kongo2002/debian-monodevelop .
docker run --rm \
    -e DISPLAY=unix$DISPLAY \          # expose the display
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    kongo2002/debian-monodevelop

This post is tagged with programming, docker and mono