Sign inSign up

arm32v7/nim

By arm32v7

•Updated 5 days ago

Nim is a statically typed, imperative programming language focusing on efficiency and elegance.

Image
Languages & frameworks
0

2.9K

arm32v7/nim repository overview

Note: this is the "per-architecture" repository for the arm32v7 builds of the nim official image⁠ -- for more information, see "Architectures other than amd64?" in the official images documentation⁠ and "An image's source changed in Git, now what?" in the official images FAQ⁠.

⁠Quick reference

⁠Quick reference (cont.)

⁠What is Nim?

Nim⁠ is a statically typed, imperative programming language that focuses on efficiency, expressiveness, and elegance. It is designed to be as fast as C and as readable as Python, while offering a powerful macro system for metaprogramming.

logo

⁠How to use this image

⁠Compile and run a Nim program (C backend)

To compile a file named main.nim and execute it immediately:

$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app arm32v7/nim nim c -r main.nim

⁠Compile to JavaScript

Nim can compile to JavaScript:

$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app arm32v7/nim nim js main.nim

To compile and run, use a multi-stage Dockerfile with Node.js:

FROM arm32v7/nim AS builder
COPY . .
RUN nim js -o:app.js src/app.nim

FROM node:latest
COPY --from=builder /usr/src/app/app.js .
CMD ["node", "app.js"]

⁠Managing packages with Nimble

The image is configured with SSL support to allow Nimble to install packages from remote repositories:

$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app arm32v7/nim nimble install -y

⁠Dockerfile example

FROM arm32v7/nim

WORKDIR /usr/src/app

COPY *.nimble .
RUN nimble install --depsOnly -y

COPY . .
RUN nimble build

CMD ["./yourapp"]

⁠License

View license information⁠ for the software contained in this image.

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 nim/ 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.

Tag summary

Content type

Image

Digest

sha256:02d0228e8…

Size

139.8 MB

Last updated

5 days ago

docker pull arm32v7/nim