From 38dcc65973a5ca6218723ffdc5510e63b10df055 Mon Sep 17 00:00:00 2001
From: Jack Wills <32690432+mrjackwills@users.noreply.github.com>
Date: Tue, 9 Dec 2025 09:34:03 +0000
Subject: [PATCH 01/21] docs: Dockerhub READEME.md updated
---
containerised/DOCKERHUB_README.md | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/containerised/DOCKERHUB_README.md b/containerised/DOCKERHUB_README.md
index d073b02..4a0b238 100644
--- a/containerised/DOCKERHUB_README.md
+++ b/containerised/DOCKERHUB_README.md
@@ -8,9 +8,15 @@
-
-
+
+
+
+
+
+ link to alternative screenshot
+
+
## Run
From 65d7970033a3e5fcb09fd1806896ed69543557a2 Mon Sep 17 00:00:00 2001
From: Jack Wills <32690432+mrjackwills@users.noreply.github.com>
Date: Tue, 9 Dec 2025 09:42:50 +0000
Subject: [PATCH 02/21] chore: Rust linting
---
Cargo.toml | 2 ++
src/app_data/mod.rs | 2 +-
src/main.rs | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Cargo.toml b/Cargo.toml
index ed71efa..a4f62b6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,6 +7,8 @@ description = "A simple tui to view & control docker containers"
repository = "https://github.com/mrjackwills/oxker"
homepage = "https://github.com/mrjackwills/oxker"
license = "MIT"
+# This is stuck to whatever version cargo-zigbuild is using - https://github.com/rust-cross/cargo-zigbuild/blob/main/Dockerfile
+rust-version = "1.87.0"
readme = "README.md"
keywords = ["docker", "tui", "tokio", "terminal", "podman"]
categories = ["command-line-utilities"]
diff --git a/src/app_data/mod.rs b/src/app_data/mod.rs
index 1139ad6..09080af 100644
--- a/src/app_data/mod.rs
+++ b/src/app_data/mod.rs
@@ -896,7 +896,7 @@ impl AppData {
if f.starts_with('/') {
f.remove(0);
}
- (*f).to_string()
+ (*f).clone()
})
});
diff --git a/src/main.rs b/src/main.rs
index 30ea787..1459de9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -48,7 +48,7 @@ fn read_docker_host(config: &Config) -> Option {
config
.host
.as_ref()
- .map_or_else(|| std::env::var(DOCKER_HOST).ok(), |x| Some(x.to_string()))
+ .map_or_else(|| std::env::var(DOCKER_HOST).ok(), |x| Some(x.clone()))
}
/// Create docker daemon handler, and only spawn up the docker data handler if a ping returns non-error
From 0763a1024f44d98b8d9d65f57995da538e40963c Mon Sep 17 00:00:00 2001
From: Jack Wills <32690432+mrjackwills@users.noreply.github.com>
Date: Tue, 9 Dec 2025 11:10:19 +0000
Subject: [PATCH 03/21] feat: set rust-version in Cargo.toml, closes #77
Update zigbuild docker run command to download latest rust version
---
.../workflows/create_release_and_build.yml | 12 ++++++--
Cargo.toml | 3 +-
create_release.sh | 8 ++++--
src/app_data/container_state.rs | 10 +++----
src/app_data/mod.rs | 10 +++----
src/config/keymap_parser.rs | 10 +++----
src/config/mod.rs | 5 ++--
src/exec.rs | 28 ++++++-------------
src/input_handler/mod.rs | 5 ++--
src/main.rs | 6 ++--
src/ui/draw_blocks/headers.rs | 5 ++--
src/ui/draw_blocks/mod.rs | 5 ++--
src/ui/mod.rs | 5 ++--
13 files changed, 50 insertions(+), 62 deletions(-)
diff --git a/.github/workflows/create_release_and_build.yml b/.github/workflows/create_release_and_build.yml
index c737331..7daa5e3 100644
--- a/.github/workflows/create_release_and_build.yml
+++ b/.github/workflows/create_release_and_build.yml
@@ -47,11 +47,19 @@ jobs:
- name: install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- # Build binary for arm MacOS using Docker Zigbuild
- name: build
if: matrix.target == 'aarch64-apple-darwin'
run: |
- docker run --rm -v $(pwd):/io -w /io ghcr.io/rust-cross/cargo-zigbuild cargo zigbuild --release --target aarch64-apple-darwin
+ docker run --rm \
+ -v "$(pwd):/io" \
+ -w /io \
+ ghcr.io/rust-cross/cargo-zigbuild \
+ bash -ec '
+ rustup update stable
+ rustup default stable
+ rustup target add aarch64-apple-darwin
+ cargo zigbuild --release --target aarch64-apple-darwin
+ '
# Build all other targets using Cross
- name: build
diff --git a/Cargo.toml b/Cargo.toml
index a4f62b6..d2f8344 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,8 +7,7 @@ description = "A simple tui to view & control docker containers"
repository = "https://github.com/mrjackwills/oxker"
homepage = "https://github.com/mrjackwills/oxker"
license = "MIT"
-# This is stuck to whatever version cargo-zigbuild is using - https://github.com/rust-cross/cargo-zigbuild/blob/main/Dockerfile
-rust-version = "1.87.0"
+rust-version = "1.90.0"
readme = "README.md"
keywords = ["docker", "tui", "tokio", "terminal", "podman"]
categories = ["command-line-utilities"]
diff --git a/create_release.sh b/create_release.sh
index 8b50e64..393ccbf 100755
--- a/create_release.sh
+++ b/create_release.sh
@@ -232,8 +232,12 @@ cross_build_x86_windows() {
# Build, using zig-build, for Apple silicon
zig_build_aarch64_apple() {
# mkdir /workspace/oxker/target
- echo -e "${YELLOW}docker run --rm -v $(pwd):/io -w /io ghcr.io/rust-cross/cargo-zigbuild cargo zigbuild --release --target aarch64-apple-darwin${RESET}"
- docker run --rm -v "$(pwd):/io" -w /io ghcr.io/rust-cross/cargo-zigbuild cargo zigbuild --release --target aarch64-apple-darwin
+ echo -e "${YELLOW}docker run --rm -v $(pwd):/io -w /io ghcr.io/rust-cross/cargo-zigbuild bash -e -c 'rustup update stable && rustup default stable && rustup target add aarch64-apple-darwin && cargo zigbuild --release --target aarch64-apple-darwin${RESET}"
+
+ docker run --rm -v "$(pwd):/io" -w /io \
+ ghcr.io/rust-cross/cargo-zigbuild \
+ bash -ec 'rustup update stable && rustup default stable && rustup target add aarch64-apple-darwin && cargo zigbuild --release --target aarch64-apple-darwin'
+
if ask_yn "sudo chown $(pwd)/target"; then
echo -e "${YELLOW}sudo chown -R vscode:vscode $(pwd)/target${RESET}"
sudo chown -R vscode:vscode "$(pwd)/target"
diff --git a/src/app_data/container_state.rs b/src/app_data/container_state.rs
index 11e39b3..bb722c8 100644
--- a/src/app_data/container_state.rs
+++ b/src/app_data/container_state.rs
@@ -689,12 +689,11 @@ impl Logs {
if let Some(new_index) = match sd {
ScrollDirection::Next => current_position.checked_add(1),
ScrollDirection::Previous => current_position.checked_sub(1),
- } {
- if let Some(f) = self.search_results.get(new_index) {
+ }
+ && let Some(f) = self.search_results.get(new_index) {
self.lines.state.select(Some(*f));
return Some(());
}
- }
} else {
let range = match sd {
ScrollDirection::Previous => (0..=current_selected).rev().collect::>(),
@@ -922,11 +921,10 @@ impl Logs {
/// Add a padding so one char will always be visilbe?
pub fn forward(&mut self, width: u16) {
let offset = usize::from(self.offset);
- if self.horizontal_scroll_able(width) {
- if self.adjusted_max_width > 0 && offset < self.adjusted_max_width {
+ if self.horizontal_scroll_able(width)
+ && self.adjusted_max_width > 0 && offset < self.adjusted_max_width {
self.offset = self.offset.saturating_add(1);
}
- }
}
/// Reduce the char offset
diff --git a/src/app_data/mod.rs b/src/app_data/mod.rs
index 09080af..1772f38 100644
--- a/src/app_data/mod.rs
+++ b/src/app_data/mod.rs
@@ -172,11 +172,10 @@ impl AppData {
}
pub fn log_search_scroll(&mut self, np: &ScrollDirection) {
- if let Some(i) = self.get_mut_selected_container() {
- if i.logs.search_scroll(np).is_some() {
+ if let Some(i) = self.get_mut_selected_container()
+ && i.logs.search_scroll(np).is_some() {
self.rerender.update_draw();
}
- }
}
pub fn gen_log_search(&self) -> Option {
@@ -340,14 +339,13 @@ impl AppData {
/// Sort containers based on a given header, if headings match, and already ascending, remove sorting
pub fn set_sort_by_header(&mut self, selected_header: Header) {
let mut output = Some((selected_header, SortedOrder::Asc));
- if let Some((current_header, order)) = self.get_sorted() {
- if current_header == selected_header {
+ if let Some((current_header, order)) = self.get_sorted()
+ && current_header == selected_header {
match order {
SortedOrder::Desc => output = None,
SortedOrder::Asc => output = Some((selected_header, SortedOrder::Desc)),
}
}
- }
self.set_sorted(output);
}
diff --git a/src/config/keymap_parser.rs b/src/config/keymap_parser.rs
index f75ff16..15c7f94 100644
--- a/src/config/keymap_parser.rs
+++ b/src/config/keymap_parser.rs
@@ -158,8 +158,8 @@ impl From