{"id":19573938,"url":"https://github.com/hexresearch/lxcops","last_synced_at":"2025-06-17T09:06:08.686Z","repository":{"id":74945602,"uuid":"111846214","full_name":"hexresearch/lxcops","owner":"hexresearch","description":"Wrapper for lxc console tools","archived":false,"fork":false,"pushed_at":"2017-12-05T17:06:03.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-02-26T11:17:17.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexresearch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-23T20:03:57.000Z","updated_at":"2017-11-23T20:25:18.000Z","dependencies_parsed_at":"2023-04-10T04:47:51.652Z","dependency_job_id":null,"html_url":"https://github.com/hexresearch/lxcops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hexresearch/lxcops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Flxcops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Flxcops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Flxcops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Flxcops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexresearch","download_url":"https://codeload.github.com/hexresearch/lxcops/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Flxcops/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260326678,"owners_count":22992381,"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":[],"created_at":"2024-11-11T06:37:05.403Z","updated_at":"2025-06-17T09:06:08.660Z","avatar_url":"https://github.com/hexresearch.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lxcops\n\nЭто обёртка над консольными командами lxc.\nИнтерфейс — как в библиотеке https://hackage.haskell.org/package/lxc, но без\nиспользования `bindings-lxc`, и реализован только частично, по необходимости.\n\n#### Пример использования\n\n[Main.hs](./examples/lxcops-example/src/Main.hs)\n\n\n```haskell\nmodule Main where\n\nimport Data.Monoid\nimport Control.Applicative\nimport Control.Monad (when)\nimport Control.Monad.IO.Class (liftIO)\n\nimport System.LxcOps\nimport System.LxcOps.Types\n\nlxcAttachOptions :: AttachOptions\nlxcAttachOptions = defaultAttachOptions { attachEnvPolicy = AttachClearEnv }\n\nmain = do\n\n  withContainer (Container \"container-name\" Nothing) $ do\n\n    isdef \u003c- isDefined\n    when isdef $ do\n\n      ci \u003c- containerInfo\n      liftIO $ putStrLn $ \"Container exists: \" \u003c\u003e show ci\n\n      stop\n      wait ContainerStopped (-1)\n      destroy\n      pure ()\n\n    d \u003c- create \"download\" Nothing Nothing [] [\"-d\", \"ubuntu\", \"-r\", \"xenial\", \"-a\", \"amd64\"]\n    start False []\n    wait ContainerRunning (-1)\n\n    cmdresult \u003c- attachRunWait lxcAttachOptions \"uname\" [\"-a\"]\n    liftIO $ putStrLn $ \"uname result: \" \u003c\u003e show cmdresult\n\n    stop\n    wait ContainerStopped (-1)\n    clone (Just \"new-name\") Nothing [CloneSnapshot] Nothing Nothing Nothing []\n\n  withContainer (Container \"new-name\" Nothing) $ do\n      ci \u003c- containerInfo\n      liftIO $ putStrLn $ \"Clone: \" \u003c\u003e show ci\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexresearch%2Flxcops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexresearch%2Flxcops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexresearch%2Flxcops/lists"}