Skip to content

[Bug]: Add docker.io to docker run command #1013

@avnf

Description

@avnf

What happened?

Hello
I suggest adding docker.io prefix to docker run command, this will improve compatibility with podman-docker (ubuntu 24.04)
I used
croc() { [ $# -eq 0 ] && set -- ""; docker run --rm -it --user "$(id -u):$(id -g)" -v "$(pwd):/c" -v "$HOME/.config/croc:/.config/croc" -w /c -e CROC_SECRET schollz/croc "$@"; } and had error
Error: short-name "schollz/croc" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
... docker run --rm -it ... docker.io/schollz/croc

Also first run with croc() + docker (in case of that podman-docker) with docker.io/schollz/croc has a error '.config/croc: no such file or directory'

What did you expect to happen?

Use docker.io/schollz/croc in croc() option to start tool.
Document that .config/croc should be created in that way of running croc.

Steps to reproduce

  1. ubuntu 24.04
  2. sudo apt install podman-docker
  3. croc() { [ $# -eq 0 ] && set -- ""; docker run --rm -it --user "$(id -u):$(id -g)" -v "$(pwd):/c" -v "$HOME/.config/croc:/.config/croc" -w /c -e CROC_SECRET schollz/croc "$@"; }
  4. Error: short-name "schollz/croc" did not resolve to an alias and no unqualified-search registries are defined in "/etc/containers/registries.conf"
  5. croc() { [ $# -eq 0 ] && set -- ""; docker run --rm -it --user "$(id -u):$(id -g)" -v "$(pwd):/c" -v "$HOME/.config/croc:/.config/croc" -w /c -e CROC_SECRET docker.io/schollz/croc "$@"; }
  6. Error: statfs /home/User/.config/croc: no such file or directory

croc version

v10.3.1

Operating System

Linux

OS Version

Ubuntu 24.04

Relevant log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions