{"id":13872270,"url":"https://github.com/alexsteinerde/docker-client-swift","last_synced_at":"2026-01-07T04:49:39.403Z","repository":{"id":40704045,"uuid":"337185766","full_name":"alexsteinerde/docker-client-swift","owner":"alexsteinerde","description":"This is a Docker Client written in Swift. It's using the NIO Framework to communicate with the Docker Engine via sockets.","archived":false,"fork":false,"pushed_at":"2023-03-07T06:32:37.000Z","size":45,"stargazers_count":64,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-06T23:51:52.518Z","etag":null,"topics":["docker-client","swift","swiftnio"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexsteinerde.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-02-08T19:26:19.000Z","updated_at":"2024-07-08T09:37:24.000Z","dependencies_parsed_at":"2024-01-16T10:09:28.333Z","dependency_job_id":null,"html_url":"https://github.com/alexsteinerde/docker-client-swift","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexsteinerde%2Fdocker-client-swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexsteinerde%2Fdocker-client-swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexsteinerde%2Fdocker-client-swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexsteinerde%2Fdocker-client-swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexsteinerde","download_url":"https://codeload.github.com/alexsteinerde/docker-client-swift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226095631,"owners_count":17572966,"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":["docker-client","swift","swiftnio"],"created_at":"2024-08-05T23:00:38.357Z","updated_at":"2026-01-07T04:49:39.366Z","avatar_url":"https://github.com/alexsteinerde.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# Docker Client\n[![Language](https://img.shields.io/badge/Swift-5.4-brightgreen.svg)](http://swift.org)\n[![Docker Engine API](https://img.shields.io/badge/Docker%20Engine%20API-%20%201.4.1-blue)](https://docs.docker.com/engine/api/v1.41/)\n\nThis is a Docker Client written in Swift. It's using the NIO Framework to communicate with the Docker Engine via sockets.\n\n\n## Current Use Cases\n- [x] List of all images\n- [x] List of all containers\n- [x] Pull an image\n- [x] Create a new container from an image\n- [x] Start a container\n- [x] Get the stdOut and stdErr output of a container\n- [x] Get the docker version information\n- [x] Manage the container state\n- [x] Create and manage services\n- [x] Update services\n- [x] List services\n- [x] Clean the system (prune containers and images)\n\n\n## Installation\n### Package.swift \n```Swift\nimport PackageDescription\n\nlet package = Package(\n    dependencies: [\n    .package(url: \"https://github.com/alexsteinerde/docker-client-swift.git\", from: \"0.1.0\"),\n    ],\n    targets: [\n    .target(name: \"App\", dependencies: [\"DockerClient\"]),\n    ...\n    ]\n)\n```\n\n### Xcode Project\nTo add DockerClientSwift to your existing Xcode project, select File -\u003e Swift Packages -\u003e Add Package Depedancy. \nEnter `https://github.com/alexsteinerde/docker-client-swift.git` for the URL.\n\n\n## Usage Example\n```swift\nlet client = DockerClient()\nlet image = try client.images.pullImage(byIdentifier: \"hello-world:latest\").wait()\nlet container = try client.containers.createContainer(image: image).wait()\ntry container.start(on: client).wait()\nlet output = try container.logs(on: client).wait()\ntry client.syncShutdown()\nprint(output)\n```\n\nFor further usage examples, please consider looking at the provided test cases. Or have a look at the demo projects in the next section.\nIf you want to read more about this package, feel free to read my [blog article](https://alexsteiner.de/blog/posts/docker-client-package-with-swift/) about it.\n\n## Demo\nThere are two demo applications.\n\nProject | Link\n--- | ---\nMac App | [https://github.com/alexsteinerde/docker-client-swift-mac-app](https://github.com/alexsteinerde/docker-client-swift-mac-app)\nVapor App | [https://github.com/alexsteinerde/docker-client-vapor-demo](https://github.com/alexsteinerde/docker-client-vapor-demo)\n\n\n## Security Advice\nWhen using this in production, make sure you secure your application so no others can execute code. Otherwise, the attacker could access your Docker environment and so all of the containers running in it.\n\n\n## License\nThis project is released under the MIT license. See [LICENSE](LICENSE) for details.\n\n\n## Contribution\nYou can contribute to this project by submitting a detailed issue or by forking this project and sending a pull request. Contributions of any kind are very welcome :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexsteinerde%2Fdocker-client-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexsteinerde%2Fdocker-client-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexsteinerde%2Fdocker-client-swift/lists"}