m/cup
1
0
mirror of https://github.com/sergi0g/cup.git synced 2025-11-18 09:53:43 -05:00

Refactor (#32)

This commit is contained in:
Sergio
2024-10-11 21:22:39 +03:00
committed by GitHub
parent 5867cb375f
commit 88885aa1dd
19 changed files with 503 additions and 400 deletions

View File

@@ -1,5 +1,5 @@
import { Steps, Callout, Card, Cards } from "nextra-theme-docs";
import { IconPaint, IconLockOpen, IconKey } from '@tabler/icons-react';
import { IconPaint, IconLockOpen, IconKey, IconPlug } from '@tabler/icons-react';
# Configuration
@@ -13,7 +13,8 @@ For example, if using Podman, you might do
$ cup -s /run/user/1000/podman/podman.sock check
```
This option will hopefully be moved to the configuration file soon.
This option is also available in the configuration file and it's best to put it there.
<Card icon={<IconPlug />} title="Custom Docker socket" href="/docs/configuration/socket" />
## Configuration file

View File

@@ -0,0 +1,10 @@
# Socket
If you need to specify a custom Docker socket (e.g. because you're using Podman), you can use the `socket` option. Here's an example:
```json
{
"socket": "/run/user/1000/podman/podman.sock"
// Other options
}
```

View File

@@ -20,12 +20,22 @@ rockylinux:9-minimal Up to date
rabbitmq:3.11.9-management Up to date
...
some/deleted:image Unknown
[38:5:86mINFO ✨ Checked 58 images in 3772ms
```
### Check for updates to a specific image
```
### Check for updates to specific images
```ansi
$ cup check node:latest
node:latest has an update available
node:latest Update available
[38:5:86mINFO ✨ Checked 1 images in 1310ms
```
```ansi
$ cup check node:latest
nextcloud:30 Update available
postgres:14 Update available
mysql:8.0 Up to date
[38:5:86mINFO ✨ Checked 3 images in 1769ms
```
## Enable icons
@@ -46,7 +56,7 @@ $ cup check -r
Here is how it would look in Typescript:
```ts
type CupData = {
interface CupData {
metrics: {
monitored_images: number,
up_to_date: number,