Code Monkey home page Code Monkey logo

oxker's Introduction


oxker

A simple tui to view & control docker containers

Built in Rust, making heavy use of ratatui & Bollard

Download & install

Cargo

Published on crates.io, so if you have cargo installed, simply run

cargo install oxker

Docker

Published on Docker Hub and ghcr.io, with images built for linux/amd64, linux/arm64, and linux/arm/v6

via Docker Hub

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock:ro --pull=always mrjackwills/oxker

via ghcr.io

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock:ro --pull=always ghcr.io/mrjackwills/oxker

Nix

Using nix flakes, oxker can be ran directly with

nix run nixpkgs#oxker

Without flakes, you can build a shell that contains oxker using

nix-shell -p oxker

AUR

oxker can be installed from the AUR with using an AUR helper:

paru -S oxker

Pre-Built

See the pre-built binaries

or, download & install (x86_64 one liner)

wget https://www.github.com/mrjackwills/oxker/releases/latest/download/oxker_linux_x86_64.tar.gz &&
tar xzvf oxker_linux_x86_64.tar.gz oxker &&
install -Dm 755 oxker -t "${HOME}/.local/bin" &&
rm oxker_linux_x86_64.tar.gz oxker

or, for automatic platform selection, download, and installation (to $HOME/.local/bin)

One should always verify script content before running in a shell

curl https://raw.githubusercontent.com/mrjackwills/oxker/main/install.sh | bash

Run

oxker

In application controls

button result
( tab ) or ( shift+tab ) change panel, clicking on a panel also changes the selected panel
( โ†‘ โ†“ ) or ( j k ) or ( PgUp PgDown ) or ( Home End ) change selected line in selected panel, mouse scroll also changes selected line
( enter ) execute selected docker command
( 1-9 ) sort containers by heading, clicking on headings also sorts the selected column
( 0 ) stop sorting
( h ) toggle help menu
( m ) toggle mouse capture - if disabled, text on screen can be selected
( q ) to quit at any time

Available command line arguments

argument result
-d [number > 0] set the minimum update interval for docker information, in ms, defaults to 1000 (1 second)
-r show raw logs, by default oxker will remove ANSI formatting (conflicts with -c)
-c attempt to color the logs (conflicts with -r)
-t remove timestamps from each log entry
-s if running via docker, will show the oxker container
-g no tui, basically a pointless debugging mode, for now

Build step

x86_64

cargo build --release

Raspberry pi

requires docker & cross-rs

64bit pi (pi 4, pi zero w 2)

cross build --target aarch64-unknown-linux-gnu --release

32bit pi (pi zero w)

Tested, and fully working on pi zero w, running Raspberry Pi OS 32 bit, the initial logs parsing can take an extended period of time if thousands of lines long, suggest running with a -d argument of 5000

cross build --target arm-unknown-linux-musleabihf --release

If no memory information available, try appending /boot/cmdline.txt with

cgroup_enable=cpuset cgroup_enable=memory

see https://forums.raspberrypi.com/viewtopic.php?t=203128 and docker/for-linux#1112

Untested on other platforms

Tests

As of yet untested, needs work

cargo test -- --test-threads=1

Run some example docker images

using docker-compose.yml;

docker compose -f docker-compose.yml up -d

or individually

docker run --name redis -d redis:alpine3.17
docker run --name postgres -e POSTGRES_PASSWORD=never_use_this_password_in_production -d postgres:alpine3.17
docker run -d --hostname my-rabbit --name rabbitmq rabbitmq:3

oxker's People

Contributors

mrjackwills avatar kianmeng avatar orhun avatar siph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.