Skip to content

Docker-Hub-frolvlad/docker-alpine-mono

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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!