26 lines
1.2 KiB
Markdown
26 lines
1.2 KiB
Markdown
# Container Management Tasks Docker or Podman
|
|
|
|
## Purpose
|
|
|
|
To work with Podman, simply make `docker` an alias to the `podman` command.
|
|
|
|
## Configuration
|
|
|
|
- Config file: `$HOME/.config/pm-task.conf`
|
|
- Config key `workspace` stores Docker/Podman projects workspace directory
|
|
- Prompts user for input if not set, creates config file if it doesn't exist
|
|
|
|
## Tasks
|
|
|
|
Tasks are defined in the first argument.
|
|
|
|
- `(none)` : Shows a numbered list menu of all subdirectories under the workspace directory, navigates to the selected directory, and runs `ls -lah`
|
|
- `restart` : Runs `docker compose down`, `sleep 1`, and `docker compose up` commands
|
|
- `start` : Runs `docker compose up` command
|
|
- `stop` : Runs `docker compose down` command
|
|
- `ps` : Runs `watch docker ps` to monitor running containers
|
|
- `stats` : Runs `docker stats` to monitor container resource usage
|
|
- `logs` / `log` : Runs `docker logs -f <container_name>` to follow container logs
|
|
- `sh` / `bash` / `shell` : Runs `docker exec -it <container_name> bash` to access container shell
|
|
- `build` / `rebuild` : Builds containers with `docker compose build`, optionally restarts containers, and reloads nginx
|
|
- `--help` : Displays available tasks and usage information |