{"id":13737238,"url":"https://github.com/sirredbeard/nim-windows-container","last_synced_at":"2025-05-08T13:33:27.696Z","repository":{"id":46551579,"uuid":"413578899","full_name":"sirredbeard/nim-windows-container","owner":"sirredbeard","description":"Windows Container for building Nim applications","archived":true,"fork":false,"pushed_at":"2023-04-14T15:44:18.000Z","size":41,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T03:08:29.576Z","etag":null,"topics":["devcontainer","developer-tools","development","nim","nim-lang","windowscontainers"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sirredbeard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-04T20:49:10.000Z","updated_at":"2024-05-29T18:37:47.000Z","dependencies_parsed_at":"2024-01-12T04:46:09.242Z","dependency_job_id":"70ea2bcd-9c1b-4b6f-aba0-34617f619ae9","html_url":"https://github.com/sirredbeard/nim-windows-container","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirredbeard%2Fnim-windows-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirredbeard%2Fnim-windows-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirredbeard%2Fnim-windows-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirredbeard%2Fnim-windows-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sirredbeard","download_url":"https://codeload.github.com/sirredbeard/nim-windows-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224737430,"owners_count":17361345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devcontainer","developer-tools","development","nim","nim-lang","windowscontainers"],"created_at":"2024-08-03T03:01:38.255Z","updated_at":"2025-05-08T13:33:27.682Z","avatar_url":"https://github.com/sirredbeard.png","language":"Dockerfile","funding_links":[],"categories":["Development Tools"],"sub_categories":["Build Systems / Package Management"],"readme":"![Untitled3](https://user-images.githubusercontent.com/33820650/135938247-73d13189-29bd-4da0-a914-732b9145dce8.png)\n\n# Nim Windows Container\n\nThis repository contains:\n\n* A [Dockerfile](https://github.com/sirredbeard/nim-windows-container/blob/main/Dockerfile) that builds a Windows Server Core Container with [Nim](https://nim-lang.org/), [MinGit](https://github.com/git-for-windows/git/wiki/MinGit), and [Mingw-w64](https://www.mingw-w64.org/) dependencies as a starting point for building Nim applications in Windows Containers.\n* A [GitHub Actions workflow](https://github.com/sirredbeard/nim-windows-container/blob/main/.github/workflows/stable.yml) for deploying the Windows Container to the GitHub Container Registry.\n\n## Nim\n\nNim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance.\n\n* [Nim](https://github.com/nim-lang/Nim) - Nim GitHub repo\n* [Learn Nim](https://nim-lang.org/learn.html) - Nim Tutorial\n* [Documentation](https://nim-lang.org/documentation.html) - Nim Documentation\n* [Nim in Action](https://www.manning.com/books/nim-in-action) - Book from Manning Publications\n* [What Is Nim? A brief introduction to the Nim programming language](https://www.youtube.com/watch?v=nKTLsUF9oyU) - YouTube video\n\n## Dockerfile\n\nThe sample [Dockerfile](https://github.com/sirredbeard/nim-windows-container/blob/main/Dockerfile) defaults to:\n\n* Windows Server 2022 LTSC.\n* Nim 1.6.12, the current stable release of Nim. It is very likely by the time you are reading this that Nim has since been updated. Check [nim-lang releases](https://github.com/nim-lang/Nim/releases) for the latest release. See the GitHub Actions below for how the latest version is automatically pulled in to the Windows Container published here.\n\n## GitHub Actions Workflow\n\nThe sample [GitHub Actions workflow](https://github.com/sirredbeard/nim-windows-container/blob/main/.github/workflows/stable.yml):\n\n* Builds the Windows Container for and Windows Server 2022 LTSC. \n* Detects and downloads the latest version of Nim by communicating with the GitHub REST API: ` $nim_version = ((Invoke-RestMethod -Uri https://api.github.com/repos/nim-lang/Nim/tags).Name | Select-Object -first 1).Trim(\"v\") ` and passing the most recent version into the Dockerfile as a build argument: `\n--build-arg nim_version=$nim_version`, overriding the default of 1.6.12.\n* Pushes the resulting container to the GitHub Container Registry.\n\nIt is not currently possible to run Windows Containers on GitHub Actions at this time, the runner only supports Linux containers. [:(](https://github.com/actions/runner/issues/1402)\n\n## Windows Container\n\n### Prerequisites for Windows Containers\n\nTo use the Windows Container, you'll need:\n\n* Windows 10/11 Pro or Enterprise editions or Windows Server 2022\n* To enable Windows Containers:\n\nAs Administator, open PowerShell, and enable Windows Containers:\n\n`Enable-WindowsOptionalFeature -Online -FeatureName containers –All`\n\n`Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All`\n\n* A container runtime that supports Windows Containers:\n\n    * Docker Desktop: Install [Docker Desktop](https://docs.docker.com/desktop/) and [specify use of Windows Containers](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce#windows-10-and-11-1)\n    * Docker CE: Install the Docker freely distributed binaries using [this guide](https://boxofcables.dev/a-lightweight-windows-container-dev-environment/)\n\n\n### Windows Server 2022 Core LTSC base\n\nTo get the Windows Container:\n\n`docker pull ghcr.io/sirredbeard/nim-windows-container/nimstable-ltsc2022:latest`\n\nTo start the Windows Container on pause, so you can exec in:\n\n`docker run ghcr.io/sirredbeard/nim-windows-container/nimstable-ltsc2022:latest pause.exe`\n\nAlso see the GitHub Container Registry [page](https://github.com/sirredbeard/nim-windows-container/pkgs/container/nim-windows-container%2Fnimstable-ltsc2022).\n\n### Build Yourself \n\nTo build and use the Windows Container yourself, you can use the Dockerfile and build locally, or:\n\n* Fork this repo\n* Let GitHub build your own Windows Container\n* Grab your [GitHub Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) from [here](https://github.com/settings/tokens)\n* Give your PAT access to read packages:\n\n![image](https://user-images.githubusercontent.com/33820650/135933784-450c5f7f-972e-472e-ab87-7e72532803b7.png)\n* Run:\n```\nSet-Variable -Name \"CR_PAT\" -Value \"\u003cPAT\u003e\"\necho $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin\ndocker pull ghcr.io/\u003cUSERNAME\u003e/nim-windows-container/nimstable-ltsc2019:latest``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirredbeard%2Fnim-windows-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirredbeard%2Fnim-windows-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirredbeard%2Fnim-windows-container/lists"}