Skip to content

4600-cli/command: adding docker volumes alias #4601

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rafaelucena
Copy link

@rafaelucena rafaelucena commented Oct 12, 2023

- What I did
I've added a new command / alias for the docker volume ls, being docker volumes

- How I did it
By altering the existing files and doing a very similar job to what the docker images does, just with the volume instead

- How to verify it
Running docker volumes on the command line

- Description for the changelog
Added a new alias for the docker volume ls command: docker volumes

- A picture of a cute animal (not mandatory but encouraged)
image

- Side notes
This is my first PR here, please be kind, and sorry in advance :)

Signed-off-by: rafael <rafael.boszko@gmail.com>
…lumesCommand

Signed-off-by: rafael <rafael.boszko@gmail.com>
@rafaelucena rafaelucena changed the title 4600-cli/command adding docker volumes alias 4600-cli/command: adding docker volumes alias Oct 12, 2023
@rafaelucena
Copy link
Author

I have not updated the md files for this change. I wasn't sure anybody would like the idea so I didn't want to go through the trouble until this got any progress stamp, but it can be done :)

@thaJeztah
Copy link
Member

Thanks for contributing! I don't think we should add this alias though; the images (plural) alias is mostly a left-over from the old UX (before docker image ls) existed, and was kept for backward compatibility, but has caused confusion for many users (I coincidentally just left a comment on one of those cases, and see you were on that ticket as well: #4591 (comment))

@rafaelucena
Copy link
Author

Hi @thaJeztah! Yeah indeed, and I realize the mistake it can cause, but at the same time I feel like this is a good and a bad move.

I feel like having docker images and not having docker volumes means it lacks consistency. But I also feel like if docker images is causing a confusion then we probably could consider including a deprecation mark on it for future usage, assuming it is meant to be removed.

Somehow I feel like the confusion users feel while mistaking docker images ls for docker image ls could be comparable to the confusion me and others feel when mistaking docker volumes wanting to use docker volume ls while it doesn't exist.

It's possible it causes a similar annoyance :)

@thaJeztah
Copy link
Member

Yeah, the original plan was to hide (soft-deprecate) these, and there's an option to hide them through an environment variable (DOCKER_HIDE_LEGACY_COMMANDS=1), but it was never turned on by default.

DOCKER_HIDE_LEGACY_COMMANDS=1 docker --help

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Common Commands:
  run         Create and run a new container from an image
  exec        Execute a command in a running container
  ps          List containers
  build       Build an image from a Dockerfile
  pull        Download an image from a registry
  push        Upload an image to a registry
  images      List images
  login       Log in to a registry
  logout      Log out from a registry
  search      Search Docker Hub for images
  version     Show the Docker version information
  info        Display system-wide information

Management Commands:
  builder     Manage builds
  buildx*     Docker Buildx (Docker Inc., v0.11.2-desktop.5)
  compose*    Docker Compose (Docker Inc., v2.22.0-desktop.2)
  container   Manage containers
  context     Manage contexts
  desktop*    Commands to interact with Docker Desktop (Docker Inc.)
  dev*        Docker Dev Environments (Docker Inc., v0.1.0)
  extension*  Manages Docker extensions (Docker Inc., v0.2.20)
  image       Manage images
  init*       Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.8)
  manifest    Manage Docker image manifests and manifest lists
  network     Manage networks
  plugin      Manage plugins
  sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan*       Docker Scan (Docker Inc., v0.26.0)
  scout*      Docker Scout (Docker Inc., v1.0.7)
  shell*      Open a browser shell on the Docker Host. (thaJeztah, v0.0.1)
  system      Manage Docker
  trust       Manage trust on Docker images
  volume      Manage volumes

Swarm Commands:
  swarm       Manage Swarm

@rafaelucena
Copy link
Author

I can understand why it's going away then. Long live the docker images. :(

Would preventing arguments on the docker images one not "resolve" the issues currently with people mistaking one by the other, though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants