{"id":15130641,"url":"https://github.com/linuxkit/lcow","last_synced_at":"2025-09-28T20:31:47.975Z","repository":{"id":70310080,"uuid":"111085629","full_name":"linuxkit/lcow","owner":"linuxkit","description":"Linux containers on Windows built with LinuxKit","archived":true,"fork":false,"pushed_at":"2020-03-23T20:20:11.000Z","size":13732,"stargazers_count":226,"open_issues_count":12,"forks_count":42,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-12-16T14:39:39.061Z","etag":null,"topics":["hyper-v","lcow","linuxkit","windows","windows-10"],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","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/linuxkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-11-17T09:37:15.000Z","updated_at":"2024-11-12T05:17:22.000Z","dependencies_parsed_at":"2023-02-25T03:00:30.816Z","dependency_job_id":null,"html_url":"https://github.com/linuxkit/lcow","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Flcow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Flcow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Flcow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxkit%2Flcow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxkit","download_url":"https://codeload.github.com/linuxkit/lcow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234563120,"owners_count":18853053,"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":["hyper-v","lcow","linuxkit","windows","windows-10"],"created_at":"2024-09-26T03:03:08.978Z","updated_at":"2025-09-28T20:31:47.560Z","avatar_url":"https://github.com/linuxkit.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LinuxKit based LCOW images\n\n[![CircleCI](https://circleci.com/gh/linuxkit/lcow.svg?style=svg)](https://circleci.com/gh/linuxkit/lcow)\n\nThis repository hosts the components to build a LinuxKit based Linux\nimage for Linux Containers on Windows.\n\n**Note:** LCOW support was **experimental** and is no longer being developed. This\nrepository is now archived. \n\n\n## Use\n\nThis section describes how to use Linux Containers on Windows with LinuxKit.\n\n\n### Prerequisites\n\nTo use Linux Containers on Windows you need a Windows build supporting\nthe feature, i.e., Windows 10 Pro or Windows Server 2016 1709 (or\nnewer Insider builds). You also need to have `Hyper-V` and the\n`Container` feature enabled.\n\n\n### Setup\n\nFor now, you need a recent version of `docker`, such as a nightly\nbuild from the master branch. In PowerShell:\n\n```\nInvoke-WebRequest -UseBasicParsing -OutFile docker.zip https://master.dockerproject.com/windows/x86_64/docker.zip\nExpand-Archive docker.zip -DestinationPath $Env:ProgramFiles\n```\n\nNext, you need to get the LinuxKit images. You can either build them\nyourself (see below) or download the latest zip file from the\n[releases page](https://github.com/linuxkit/lcow/releases). Then unzip\nin an elevated PowerShell:\n\n```\nRemove-Item \"$env:ProgramFiles\\Linux Containers\" -Force -Recurse\nExpand-Archive release.zip -DestinationPath \"$Env:ProgramFiles\\Linux Containers\\.\"\nrm release.zip\n```\n\n### Run\n\nOn recent `docker` master builds (`master-dockerproject-2018-01-20, build 44a1168a` or newer):\n\nStart the docker daemon (in an elevated PowerShell):\n\n```\n.\\dockerd.exe -D --experimental\n```\n\nYou should now be able to run Linux containers on Windows, e.g.:\n\n```\ndocker run --platform linux --rm -ti busybox sh\n```\n\nOn older `docker` master builds:\n\nStart the docker daemon (in an elevated PowerShell):\n\n```\n$env:LCOW_SUPPORTED=1\n$env:LCOW_API_PLATFORM_IF_OMITTED=\"linux\"\nRemove-Item c:\\lcow -Force -Recurse; mkdir c:\\lcow\n.\\dockerd.exe -D --experimental --data-root c:\\lcow\n```\n\n(Note: If your kernel is older than 4.14 and is configured with KASLR\nyou may want to add `--storage-opt lcow.bootparameters=\"nokaslr\"` to\nthe `dockerd` command line.)\n\nYou should now be able to run Linux containers on Windows, e.g.:\n\n```\ndocker run --rm -ti busybox sh\n```\n\nIf you already have `docker` installed on your system you probably\nwant to start the daemon (and the client) on a non-standard named pipe\nusing the `-H \"npipe:////./pipe//docker_lcow\"` for both.\n\n\n## Build\n\nThe LinuxKit image is build from [`lcow.yml`](./lcow.yml) and the main\npackage is called [`init-lcow`](./pkg/init-lcow).\n\n### Prerequisites\n\nTo build images and packages you will need the [LinuxKit\ntool](https://github.com/linuxkit/linuxkit/tree/master/src/cmd/linuxkit). You\nalso need to have a working Docker installation.\n\nIf you already have `go` installed you can use `go get -u\ngithub.com/linuxkit/linuxkit/src/cmd/linuxkit` to install the\n`linuxkit` tool.\n\nOn macOS there is a `brew tap` available. Detailed instructions are at\n[linuxkit/homebrew-linuxkit](https://github.com/linuxkit/homebrew-linuxkit),\nbut the short summary is:\n\n```\nbrew tap linuxkit/linuxkit\nbrew install --HEAD linuxkit\n```\n\n\n### Building the LCOW image\n\nSimply type:\n\n```\nmake\n```\n\nwhich generates `kernel` and `initrd.img` which need to be copied to `\"$env:ProgramFiles\\Linux Containers\\kernel\"` on your Windows system.\n\n\nAlternatively, use:\n\n```\nlinuxkit build lcow.yml\n```\n\nThis will generate three files: `lcow-kernel`, `lcow-initrd.img`, and\n`lcow-cmdline`. `lcow-kernel` needs to be copied to\n`\"$env:ProgramFiles\\Linux Containers\\kernel\"` and\n`lcow-initrd.img` to `\"$env:ProgramFiles\\Linux\nContainers\\initrd.img\"`.\n\n\n### Building the `init-lcow` package\n\nThe [`init-lcow`](./pkg/init-lcow) contains a minimal `init` system\nused inside the LCOW and mainly consists of the [OpenGCS\ndeamon](https://github.com/Microsoft/opengcs). To rebuild the package\nuse the `linuxkit` tool:\n\n```\nlinuxkit pkg build -org foo pkg/init-lcow\n```\n\nThis should create a local image `foo/init-lcow:\u003ctag\u003e` which can be used `lcow.yml`. To build and push the image to hub use:\n\n```\nlinuxkit pkg build -org \u003cyour hub name\u003e -disable-content-trust pkg/init-lcow\n```\n\nYou can omit `-disable-content-trust` if your registry has Docker\nContent Trust enabled.\n\n\n## Test\n\nThe [`tests`](./tests) directory contains a number of tests for LCOW\nwritten using [`rtf`](https://github.com/linuxkit/rtf). To run them\nyou can simply execute [`RunTests.ps1`](./tests/RunTests.ps1) inside\nthe `.\\tests` directory. It will pick up the kernel/initrd in the\nparent directory if present. Alternatively, it can download the\nartefact from CircleCI if you supply the build number. The script will\nalso download the latest version of `docker` and the version of the\n`rtf` binary.\n\nTest results will be stored in `.\\tests\\_results\\\u003cUUID\u003e` directory\nwhere `\u003cUUID\u003e` is the UUID printed out during the test run.\n\nTo manually run the test, make sure you have a working LCOW system set\nup. You'll also need a copy of the `rtf.exe` binary (see\n[`RunTests.ps1`](./tests/RunTests.ps1) on how to obtain it or `go get\n..` it). Further, `docker` must also be in your path.\n\nTo run tests, use `rtf run` inside the `.\\tests` directory. To list\nwhich tests are available use `rtf list` or `rtf info`. To run an\nindividual test or a group of tests use `rtf run \u003cname\u003e`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Flcow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxkit%2Flcow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxkit%2Flcow/lists"}