mono
Estimated reading time: 4 minutesMono is an open source implementation of Microsoft’s .NET Framework
GitHub repo: https://github.com/mono/docker
Library reference
This content is imported from the official Docker Library docs, and is provided by the original uploader. You can view the Docker Store page for this image at https://store.docker.com/images/mono
Supported tags and respective Dockerfile
links
5.4.0.201
,5.4.0
,5.4
,5
,latest
(5.4.0.201/Dockerfile)5.4.0.201-slim
,5.4.0-slim
,5.4-slim
,5-slim
,slim
(5.4.0.201/slim/Dockerfile)5.2.0.224
,5.2.0
,5.2
(5.2.0.224/Dockerfile)5.2.0.224-slim
,5.2.0-slim
,5.2-slim
(5.2.0.224/slim/Dockerfile)4.8.0.524
,4.8.0
,4.8
,4
(4.8.0.524/Dockerfile)
Quick reference
-
Where to get help:
the Docker Community Forums, the Docker Community Slack, or Stack Overflow -
Where to file issues:
https://github.com/mono/docker/issues -
Maintained by:
the Mono Project -
Supported architectures: (more info)
amd64
,arm32v7
,arm64v8
,i386
-
Published image artifact details:
repo-info repo’srepos/mono/
directory (history)
(image metadata, transfer size, etc) -
Image updates:
official-images PRs with labellibrary/mono
official-images repo’slibrary/mono
file (history) -
Source of this description:
docs repo’smono/
directory (history) -
Supported Docker versions:
the latest release (down to 1.6 on a best-effort basis)
What is Mono
Sponsored by Xamarin, Mono is an open source implementation of Microsoft’s .NET Framework based on the ECMA standards for C# and the Common Language Runtime. A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of cross platform applications.
How to use this image
This image will run stand-alone Mono console apps.
Create a Dockerfile
in your Mono app project
This example Dockerfile will run an executable called TestingConsoleApp.exe
.
FROM mono:3.10-onbuild
CMD [ "mono", "./TestingConsoleApp.exe" ]
Place this file in the root of your app, next to the .sln
solution file. Modify the exectuable name to match what you want to run.
This image includes ONBUILD
triggers that adds your app source code to /usr/src/app/source
, restores NuGet packages and compiles the app, placing the output in /usr/src/app/build
.
With the Dockerfile in place, you can build and run a Docker image with your app:
$ docker build -t my-app .
$ docker run my-app
You should see any output from your app now.
Credits
This Docker image is provided by Xamarin, for users of the Mono Project.
Thanks to Michael Friis for his preliminary work.
Image Variants
The mono
images come in many flavors, each designed for a specific use case.
mono:<version>
This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.
mono:slim
This image does not contain the common packages contained in the default tag and only contains the minimal packages needed to run mono
. Unless you are working in an environment where only the mono
image will be deployed and you have space constraints, we highly recommend using the default image of this repository.
License
This Docker Image is licensed with the Expat License. See the Mono Project licensing FAQ for details on how Mono and associated libraries are licensed.
As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).
Some additional license information which was able to be auto-detected might be found in the repo-info
repository’s mono/
directory.
As for any pre-built image usage, it is the image user’s responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
library, sample, mono