Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theakito/docker-nim
Multi-Arch Nim Docker Image for linux/ppc64le, linux/arm/v7, linux/arm64/v8 & linux/amd64.
https://github.com/theakito/docker-nim
arm64 docker linux nim
Last synced: 29 days ago
JSON representation
Multi-Arch Nim Docker Image for linux/ppc64le, linux/arm/v7, linux/arm64/v8 & linux/amd64.
- Host: GitHub
- URL: https://github.com/theakito/docker-nim
- Owner: theAkito
- License: gpl-3.0
- Created: 2023-10-11T22:14:27.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-06T20:12:39.000Z (4 months ago)
- Last Synced: 2024-09-06T23:45:59.417Z (4 months ago)
- Topics: arm64, docker, linux, nim
- Language: Shell
- Homepage:
- Size: 54.7 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Docker Image Version (latest semver)](https://img.shields.io/docker/v/akito13/nim?style=plastic)
![Docker Stars](https://img.shields.io/docker/stars/akito13/nim?style=plastic)
![Docker Pulls](https://img.shields.io/docker/pulls/akito13/nim?style=plastic)![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/akito13/nim?style=plastic)
![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/akito13/nim?style=plastic)[![Upstream](https://img.shields.io/badge/upstream-project-yellow?style=plastic)](https://github.com/nim-lang/Nim)
![GitHub](https://img.shields.io/github/license/theAkito/docker-nim?style=plastic)
![Liberapay patrons](https://img.shields.io/liberapay/patrons/Akito?style=plastic)## What
Nim compiler in Docker images, but with support for multiple platforms.## Why
The current official [Nimage](https://github.com/moigagoo/nimage) only supports [`linux/amd64` builds](https://hub.docker.com/r/nimlang/nim/tags).
This one supports at least the following platforms, based on what the [Ubuntu base images](https://hub.docker.com/_/ubuntu/tags) support.```
linux/ppc64le
linux/arm/v7
linux/arm64/v8
linux/amd64
```The [Alpine based images](https://hub.docker.com/_/alpine/tags) support the following architectures.
```
linux/ppc64le
linux/arm/v7
linux/arm64/v8
linux/amd64
```## How
Semver tags are referring to the Nim version contained in that particular image.## Get
#### Latest build
```bash
docker pull akito13/nim
```
#### Fixed version
```bash
docker pull akito13/nim:2.0.8
```
Tags follow semver, without the `v`.
Git tags equal Docker tags, so no need to check tags explicitly on Docker Hub.## Build
#### Build yourself
```bash
bash docker-build.sh
```## Run
#### Create Test File
```bash
echo 'import std/json; echo """{"hello":"test"}""".parseJson.pretty' > t.nim
```#### Rootless
If you simply need to compile something, always use the rootless image.```bash
docker run -itv "$PWD:/cwd" --rm akito13/nim:2.0.8-rootless bash -c "nim c -r /cwd/t.nim && rm /cwd/t"
```#### Root
If you compile or install something, which depends on libraries installed through `apt` or otherwise need root access, you can use the `root` based image.```bash
docker run -it --rm akito13/nim:2.0.8 bash -c "apt update && apt install -y libncurses-dev && nimble install -y moe"
```You may also run the rootless image as `root`, if you don't want to download an additional image & instead re-use the already existing rootless one.
```bash
docker run -it --rm --user root akito13/nim:2.0.8-rootless bash -c "apt update && apt install -y libncurses-dev && nimble install -y moe"
```### Alpine
You may also use the [Alpine](https://www.alpinelinux.org/) based images.```sh
docker run -it --rm akito13/nim:2.0.8-alpine sh -c "apk --no-cache add ncurses-dev pcre && nimble install -y moe"
```## License
Copyright © 2022-2024 AkitoThis program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, see .