Docker image for the Nim programming language (https://nim-lang.org/).
497
Simple Docker image including the Nim language compiler and tools (https://nim-lang.org/)
$ docker pull andreburgaud/nim
The following examples are using files available in the GitHub repository of this image (folder examples):
https://github.com/andreburgaud/docker-nim
hello.nim), and execute it (option -r) :$ docker run --rm -v `pwd`/examples/:/workspace/ andreburgaud/nim nim c -r hello.nim
hello.nim) in release mode:$ docker run --rm -v `pwd`/examples/:/workspace/ andreburgaud/nim nim c -d:release hello.nim
$ docker run --rm -v `pwd`/examples/:/workspace/ andreburgaud/nim ./hello
wc.nim). First, package strfmt needs to be installed:$ docker run --rm -it -v `pwd`/examples/:/workspace/ andreburgaud/nim sh -c "nimble install strfmt && nim c -d:release wc.nim"
When prompted to download a dependent package from the internet (strfmt), press y followed by the key Enter.
$ docker run --rm -v `pwd`/examples/:/workspace/ andreburgaud/nim ./wc wc.nim
wc:$ docker run --rm -v `pwd`/examples/:/workspace/ andreburgaud/nim ./wc --help
$ docker run --rm -it -v `pwd`/examples/wc_proj/:/workspace/ andreburgaud/nim nimble c -d:release wc.nim
When prompted to download a dependent package from the internet (strfmt), press y followed by they key Enter.
$ docker run --rm -it -v `pwd`/examples/wc_proj/:/workspace/ andreburgaud/nim ./wc wc.nim
$ docker build -t nim-dev .
Note that as of 12/6/2017, nim and nimble were still in the Alpine testing repository, thus requiring the following line, in the Dockerfile, prior to execute apk add:
RUN echo http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
Content type
Image
Digest
Size
60.8 MB
Last updated
almost 9 years ago
docker pull andreburgaud/nim