This commit is contained in:
JMARyA 2023-12-17 07:50:25 +01:00
parent bf3e5f21f9
commit 6a528518a1
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 36 additions and 101 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,109 +1,43 @@
---
website: https://podman.io/
website: https://podman.io
obj: application
repo: https://github.com/containers/podman
---
# Podman
#refactor
Podman is a rootless container engine.
# Usage
### Container Management:
1. **podman-attach**
- Description: Attach to a running container.
- Usage: `podman attach [OPTIONS] CONTAINER`
- Flags:
- `-i, --interactive`: Attach with standard input connected.
- `-t, --tty`: Allocate a pseudo-TTY.
2. **podman-container**
- Description: Manage containers.
- Usage: `podman container [SUBCOMMAND] [OPTIONS]`
- Subcommands:
- `create`: Create a new container.
- `list`: List containers.
- `inspect`: Display container configuration.
- `start`: Start one or more containers.
- `stop`: Stop one or more running containers.
- `restart`: Restart one or more containers.
- `pause`: Pause one or more containers.
- `unpause`: Unpause one or more containers.
- `kill`: Kill the main process in one or more containers.
- `rm`: Remove one or more containers.
- ... and more.
### Image Management:
1. **podman-build**
- Description: Build a container image using a Containerfile.
- Usage: `podman build [OPTIONS] PATH | URL | -`
- Flags:
- `-t, --tag`: Name and optionally a tag for the image.
2. **podman-commit**
- Description: Create a new image based on the changed container.
- Usage: `podman commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]`
- Flags:
- `--change`: Apply Dockerfile instruction to the image.
4. **podman-image**
- Description: Manage images.
- Usage: `podman image [SUBCOMMAND] [OPTIONS]`
- Subcommands:
- `list`: List images in local storage.
- `inspect`: Display image configuration.
- `remove`: Remove one or more locally stored images.
- ... and more.
5. **podman-import**
- Description: Import a tarball and save it as a filesystem image.
- Usage: `podman import [OPTIONS] FILE|- [REPOSITORY[:TAG]]`
- Flags:
- `-i, --input`: Read from specified file.
6. **podman-pull**
- Description: Pull an image from a registry.
- Usage: `podman pull [OPTIONS] IMAGE[:TAG|@DIGEST]`
7. **podman-push**
- Description: Push an image, manifest list, or image index from local storage to elsewhere.
- Usage: `podman push [OPTIONS] IMAGE[:TAG] [DESTINATION]`
8. **podman-save**
- Description: Save image(s) to an archive.
- Usage: `podman save [OPTIONS] IMAGE [IMAGE...]`
- Flags:
- `-o, --output`: Write to specified file.
## Usage
Podmans command line interface is almost identical to Dockers. For reference see [Docker](Docker.md).
### Execution and Interaction:
1. **podman-exec**
- Description: Execute a command in a running container.
- Usage: `podman exec [OPTIONS] CONTAINER COMMAND [ARG...]`
- Flags:
- `-i, --interactive`: Attach with standard input connected.
- `-t, --tty`: Allocate a pseudo-TTY.
2. **podman-logs**
- Description: Display the logs of one or more containers.
- Usage: `podman logs [OPTIONS] CONTAINER [CONTAINER...]`
- Flags:
- `-f, --follow`: Follow log output.
3. **podman-ps**
- Description: Print out information about containers.
- Usage: `podman ps [OPTIONS]`
- Flags:
- `--all`: Show all containers (including stopped).
### `podman port`
List port mappings for the _container_ or look up the public-facing port that is NAT-ed to the _private-port_.
### Network and Volume Management:
1. **podman-cp**
- Description: Copy files/folders between a container and the local filesystem.
- Usage: `podman cp [OPTIONS] SRC_CONTAINER:SRC_PATH DEST_PATH | DEST_CONTAINER:DEST_PATH`
2. **podman-network**
- Description: Manage Podman networks.
- Usage: `podman network [OPTIONS] COMMAND`
- Subcommands:
- `list`: List networks.
- `inspect`: Display network configuration.
- `create`: Create a new network.
- `delete`: Remove one or more networks.
- ... and more.
3. **podman-volume**
- Description: Simple management tool for volumes.
- Usage: `podman volume [SUBCOMMAND] [OPTIONS]`
- Subcommands:
- `list`: List volumes.
- `create`: Create a new volume.
- `inspect`: Display volume configuration.
- `remove`: Remove one or more volumes.
- ... and more.
```shell
# podman port b4d2f054
80/udp -> 0.0.0.0:44327
80/tcp -> 0.0.0.0:44327
```
### `podman diff`
Inspect changes on a container or images filesystem.
Usage: `podman diff [options] container|image [container|image]`
```shell
$ podman diff --format json myimage
{
"changed": [
"/usr",
"/usr/local",
"/usr/local/bin"
],
"added": [
"/usr/local/bin/docker-entrypoint.sh"
]
}
$ podman diff container1 image1
A /test
```