Skip to content

add `container list` for Docker containers

STEVAN Antoine requested to merge docker-container-list into main

examples

./make.rs container list --json
    | from ndjson
    | into datetime CreatedAt
    | into filesize Size VirtualSize
    | reject CreatedSince

or

./make.rs container list --json
    | from ndjson
    | into datetime CreatedAt
    | into filesize Size VirtualSize
    | reject CreatedSince
    | select ID Repository Tag CreatedAt VirtualSize
    | update Tag { str substring 0..<7 }

changelog

  • transform options of container to sub-subcommands
    • container --> container build
    • container --login --> container login
    • container --push --> container push
  • add container list to print the local images for the GitLab and GitHub repositories
    • container list will print in a pretty table
    • container list --json will print as NDJSON, i.e. one image per line as JSON
  • use wrappers around nob::run_cmd_as_vec_and_fail!
    • extend_and_run to run a partial command with an extra vector of args
    • extend_and_run_and_capture_silent to run a partial command with an extra vector of args and silently capture the stdout into a string
    • this allows to get rid of the #[rustfmt::skip] directive on main and format the code not too aggressively
Edited by STEVAN Antoine

Merge request reports

Loading