Go to file
2024-08-18 14:20:54 +02:00
src (refactor): code clean up, image pull and tag test 2024-08-18 14:20:54 +02:00
.gitattributes (feature): init 2024-08-17 22:11:46 +02:00
.gitignore (feature): init 2024-08-17 22:11:46 +02:00
LICENSE.md (feature): init 2024-08-17 22:11:46 +02:00
README.md (feature): nuget 2024-08-17 23:56:00 +02:00

Sure! Here's how your README file would look in Markdown format:

# PodmanClientDotNet

## Description

`PodmanClientDotNet` is a .NET library designed to provide seamless interaction with the Podman API, allowing developers to manage and control containers directly from their .NET applications. This client library wraps the Podman API endpoints, offering a .NET-friendly interface to perform common container operations such as creating, starting, stopping, deleting containers, and more.

## Purpose

The primary goal of `PodmanClientDotNet` is to simplify the integration of Podman into .NET applications by providing a comprehensive, easy-to-use client library. Whether you're managing container lifecycles, executing commands inside containers, or manipulating container images, this library allows developers to interface with Podman using the familiar .NET development environment.

## Key Features

- **Container Management:** Create, start, stop, and delete containers with straightforward methods.
- **Image Operations:** Pull, tag, and manage images using the Podman API.
- **Exec Support:** Execute commands inside running containers, with support for attaching input/output streams.
- **Volume and Network Management:** Manage container volumes and networks as needed.
- **Streamlined Error Handling:** Provides detailed error handling, with informative responses based on HTTP status codes.

## Usage Example

```csharp
// Initialize the PodmanClient with base URL and timeout
var podmanClient = new PodmanClient("http://localhost:8080", 5);

// Create a new container
var createResponse = await podmanClient.CreateContainerAsync(
    name: "my-container",
    image: "alpine:latest",
    command: new List<string> { "/bin/sh" },
    env: new Dictionary<string, string> { { "ENV_VAR", "value" } },
    remove: true
);

// Start the container
await podmanClient.StartContainerAsync(createResponse.Id);

// Execute a command inside the container
var execResponse = await podmanClient.CreateExecAsync(createResponse.Id, new[] { "echo", "Hello, World!" });
await podmanClient.StartExecAsync(execResponse.Id);

Installation

To include PodmanClientDotNet in your .NET project, you can add the package via NuGet:

dotnet add package PodmanClient.DotNet --version 1.0.2

Documentation

For detailed documentation on each method, including parameter descriptions and example usage, please refer to the official documentation (link to be provided).

Contribution

Contributions to this project are welcome! Please fork the repository and submit a pull request with your changes. If you encounter any issues or have feature requests, feel free to open an issue on GitHub.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For any questions or inquiries, please reach out via GitHub or email.


This Markdown file is structured to provide a clear and informative README for your GitHub repository, offering essential details about your `PodmanClientDotNet` library.