/docker-alpine-mono

The smallest Docker image with Mono (~130MB)

MIT LicenseMIT

Docker Stars Docker Pulls

Mono (C#) Docker image

This image is based on Alpine Linux image, which is only a 5MB image, and contains Mono.

Download size of this image is only:

There are also legacy images of Mono 4.8, 5.0, and 5.4 based on glibc hack:

4.8-glibc -

5.0-glibc -

5.4-glibc -

Usage Example

$ echo 'using System; class MainClass { public static void Main (string[] args) { Console.WriteLine ("Hello World"); } }' > qq.mono
$ docker run --rm -v "$(pwd)":/mnt frolvlad/alpine-mono sh -c "mcs -out:/mnt/qq.exe /mnt/qq.mono && mono /mnt/qq.exe"

Once you have run these commands you will have qq.exe mono-executable in your current directory, and you will get printed 'Hello World' from Mono!