Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Podman release readme #64

Merged
merged 2 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 84 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Introducing **goManageDocker** (get it?)! This blazing fast TUI, made using Go a
## Contents

1. [Install Instructions](#install-instructions)
2. [Quick Start](#quick-start)
2. [Features](#features)
3. [Keybinds](#keybinds)
4. [Configuration](#configuration)
Expand Down Expand Up @@ -48,29 +49,62 @@ Now, **goManageDocker 😏!!**
### Docker
Want to try this without installing a binary? I gotchu!

Docker:

```
docker run -it -v /var/run/docker.sock:/var/run/docker.sock kakshipth/gomanagedocker:latest
```

Podman:

```
docker run -it -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock kakshipth/gomanagedocker:latest p
```

Alias it to something quicker (unless you like typing a lot 🙄)

## Quick Start

### docker

To connect to the docker service:
```
gmd
```


### podman

First start the podman service:

```
systemctl --user start podman.socket
```

(replace `start` with `enable` if you'd like to start it during every boot)

To connect to the podman service:

```
gmd p
```

(Issuing the subcommand `p` connects to the podman socket)

> [!NOTE]
> The command to invoke the TUI changes depending on the install method, if you installed from source you would be typing `gomanagedocker` instead of `gmd` (unless you aliased it to `gmd`).


## Features

### **New in v1.4:**
### **New in v1.5:**

1. goManageDocker now has first class support for Podman!! (who doesn't like more secure containers 😉). You can now manage podman images, container, volumes and even pods from the TUI!

![podmanRun](vhs/gifs/podmanRun.gif)


1. Global notification system
![notificationSystem](vhs/gifs/notifications.gif)

2. Bulk operation mode: select multiple objects before performing an operations (saves so much time!!)
![bulkDelete](vhs/gifs/bulkDelete.gif)

3. Build image from Dockerfile using `b`
![build](vhs/gifs/build.gif)

4. View live logs from a container using `L`
![runImage](vhs/gifs/logs.gif)

5. Run image now takes arguments for port, name and env vars.
![runImage](vhs/gifs/runImage.gif)

### **Previous release features:**

Expand Down Expand Up @@ -101,9 +135,25 @@ Alias it to something quicker (unless you like typing a lot 🙄)

9. You can directly copy the ID to your clipboard of an object by pressing `c`.
![copyId](vhs/gifs/copyId.gif)

10. You can now run and exec into an image directly from the images tab with `x`
![runAndExec](vhs/gifs/execFromImgs.gif)

11. Global notification system
![notificationSystem](vhs/gifs/notifications.gif)

12. Bulk operation mode: select multiple objects before performing an operations (saves so much time!!)
![bulkDelete](vhs/gifs/bulkDelete.gif)

13. Build image from Dockerfile using `b`
![build](vhs/gifs/build.gif)

14. View live logs from a container using `L`
![runImage](vhs/gifs/logs.gif)

15. Run image now takes arguments for port, name and env vars.
![runImage](vhs/gifs/runImage.gif)

## Keybinds

### Navigation
Expand Down Expand Up @@ -152,6 +202,20 @@ Alias it to something quicker (unless you like typing a lot 🙄)
| Prune | <kbd>p</kbd> |
| Copy Volume Name | <kbd>c</kbd> |


### Pods
| Operation | Key |
|-------------------|---------------------------------------------------------------|
| Create New Pod | <kbd>n</kbd> |
| Toggle Start/Stop | <kbd>s</kbd> |
| Toggle Pause | <kbd>t</kbd> |
| Restart | <kbd>r</kbd> |
| Delete | <kbd>d</kbd> |
| Delete (Force) | <kbd>D</kbd> |
| Prune | <kbd>p</kbd> |
| Copy ID | <kbd>c</kbd> |
| Show Logs | <kbd>L</kbd> |

## Configuration

I've added support for config files from V1.2.
Expand All @@ -163,12 +227,15 @@ Default Configuration:
```
config:
Polling-Time: 500
Tab-Order: [images, containers, volumes]
Notification-timeout: 2000
Tab-Order:
Docker: [images, containers, volumes]
Podman: [images, containers, volumes, pods]
Notification-Timeout: 2000

```

- Polling-Time: Set how frequently the program calls the docker API (measured in milliseconds, default: 500ms)
- Tab-Order: Set the order of tabs displayed, the keys must be `images`, `containers` and `volumes`. You can omit the names of the tabs you do not wish to see as well. Say I want to see `containers` tab first and do not want to see the `volumes` tab, I can set `Tab-Order: [containers, images]`
- Tab-Order: Define the order of tabs displayed for Docker and Podman. Each key specifies the tab order for its respective environment. Valid tabs include `images`, `containers`, `volumes`, and `pods` (for Podman only). You can omit tabs you don’t wish to display.
- Notification-Timeout: Set how long a status message sticks around for (measured in milliseconds, default: 2000ms)

## Roadmap
Expand Down
6 changes: 5 additions & 1 deletion tui/mainModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,11 @@ func (m MainModel) getSelectedItems() []dockerRes {

return vals
} else {
return []dockerRes{activeTab.list.SelectedItem().(dockerRes)}
if dres, ok := activeTab.list.SelectedItem().(dockerRes); ok {
return []dockerRes{dres}
} else {
return nil
}
}
}

Expand Down
Binary file added vhs/gifs/podmanRun.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions vhs/podmanRun.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Output vhs/gifs/podmanRun.gif

Require gmd

Set Shell "zsh"
Set FontSize 16
Set Width 1920
Set Height 1080
Set TypingSpeed 0.1
Set Theme Batman


Sleep 1s
Type "gmd p"
Enter
Sleep 1s
Type "r"
Sleep 1s
Type " "
Sleep 500ms
Type " "
Sleep 500ms
Type "j"
Sleep 500ms
Enter
Type@150ms"redis_container"
Enter
Sleep 300ms
Enter
Type@1s "lll"
Sleep 2s
Type "q"