Public | Automated Build

Last pushed: 2 years ago
Short Description
Alpine Linux configured with the latest F# release built from source on Mono
Full Description


Mono (F#) Docker image

This image is based on Alpine Linux image, which is only a 5MB image, and contains
Mono as well as the F# compiler and interpreter.

This image is sourced from the Mono docker image.

WARNING: That Mono image was compiled for Arch Linux and is ported to Alpine via
glibc hack! It is being used
because the current Mono package for Alpine Linux (based on musl instead of glibc)
generates a segfault when bootstrapping the F# compiler.

Total size of this image is only:

Usage Example

By default, the image will open the F# Interpreter and await input.

$ docker run -i -t neoeinstein/fsharp-alpine

You can also invoke the interpreter to execute a file:

$ echo 'let img = "Alpine Linux"' > qq.fsx
$ echo 'printfn "Hello World from fsharpi on %s" img' >> qq.fsx
$ docker run --rm -v "$(pwd)":/mnt neoeinstein/fsharp-alpine fsharpi --exec /mnt/qq.fsx

That same file can be compiled into an executable and run:

$ echo 'let img = "Alpine Linux" in printfn "Hello World from fsharpc on %s" img' > qq.fs
$ docker run --rm -v "$(pwd)":/mnt neoeinstein/fsharp-alpine sh -c "fsharpc -o:/mnt/qq.exe /mnt/qq.fs && mono /mnt/qq.exe"
Docker Pull Command
Owner
neoeinstein