genuinetools / img

Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.
https://blog.jessfraz.com/post/building-container-images-securely-on-kubernetes/
MIT License
3.89k stars 230 forks source link

img flags doesn't seem to work #249

Closed henres closed 4 years ago

henres commented 5 years ago

When i want to use flags globally, it doesn't seem to work.

bash-4.4$ img
img -  Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder.

Usage: img <command>

Flags:

  -b, --backend  backend for snapshots ([auto native overlayfs]) (default: auto)
  -d, --debug    enable debug logging (default: false)
  -s, --state    directory to hold the global state (default: /home/user/.local/share/img)

Commands:

  build    Build an image from a Dockerfile.
  du       Show image disk usage.
  ls       List images and digests.
  login    Log in to a Docker registry.
  logout   Log out from a Docker registry.
  prune    Prune and clean up the build cache.
  pull     Pull an image or a repository from a registry.
  push     Push an image or a repository to a registry.
  rm       Remove one or more images.
  save     Save an image to a tar archive (streamed to STDOUT by default).
  tag      Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE.
  unpack   Unpack an image to a rootfs directory.
  version  Show the version information.

bash-4.4$ img -s
-s: no such command
issue-label-bot[bot] commented 5 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

kekoav commented 5 years ago

@henres What do you expect to happen? That flag -s is to change the state directory for the current command.

kekoav commented 4 years ago

@AkihiroSuda I think this issue should be closed, there's no bug here (anymore). Works as expected.

$ img -s
Error: flag needs an argument: 's' in -s
img -  Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder

Usage: img [OPTIONS] COMMAND [ARG...]

Flags:
  -b, --backend string   backend for snapshots ([auto native overlayfs]) (default "auto")
  -d, --debug            enable debug logging
  -h, --help             help for img
  -s, --state string     directory to hold the global state (default "/home/user/.local/share/img")
  -v, --version          Print version information and quit

Commands:
  build       Build an image from a Dockerfile
  du          Show image disk usage.
  help        Help about any command
  login       Log in to a Docker registry.
  logout      Log out from a Docker registry.
  ls          List images and digests.
  prune       Prune and clean up the build cache.
  pull        Pull an image or a repository from a registry.
  push        Push an image or a repository to a registry.
  rm          Remove one or more images.
  save        Save an image to a tar archive (streamed to STDOUT by default).
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE.
  unpack      Unpack an image to a rootfs directory.
  version     Show the version information.

Use "img [command] --help" for more information about a command.