Visitar URL original
make it obvious in terminal for user if using docker-env · Issue #6489 · kubernetes/minikube · GitHub
Skip to content

make it obvious in terminal for user if using docker-env #6489

Open

Description

@medyagh

I was thinking as part of the eval $(minikube docker-env) we could pass something that changes the terminal Prompt so it is obvious for the user they are usinf minikube's docker not their own docker.

maybe:
something like:

medya@~ $ PS1="$PS1""(using minikube dockerd) $:"

that will try turn into

medya@~ $ (using minikube dockerd) $:

the minikube word would be profile name, this will also make it clear which profile's docker-env we are using.

helps with #6462
helps with #6437

also we could explicity set a ENV that says

USES_MINIKUBE_DOCKERD=PROFILE_NAME

Activity

  1. changed the title [-]make it obvious for user if using docker-env[/-] [+]make it obvious in terminal for user if using docker-env[/+] on Feb 4, 2020
  2. tstromberg commented on Feb 4, 2020

    @tstromberg
    Contributor

    Environment variable sounds good.

    I wouldn't be opposed to prompt manipulation if it was an extra flag to docker-env. Like minikube docker-env --prompt. I would prefer it be explicit, as not everyone is going to like us manipulating their prompt.

    Keep in mind that many folks build prompts with dynamic functions, particularly in the zsh and fish community.

  3. added
    kind/featureCategorizes issue or PR as related to a new feature.
    priority/backlogHigher priority than priority/awaiting-more-evidence.
    on Feb 5, 2020
  4. added this to the v1.9.0 March 30th milestone on Mar 7, 2020
  5. self-assigned this
    on Mar 7, 2020
  6. afbjorklund commented on Mar 7, 2020

    @afbjorklund
    Collaborator

    This sounds like something that should be a part of docker, rather than minikube ?
    i.e. displaying the DOCKER_HOST in the prompt

    We don't even put the current kubectl context in the prompt, which sounds more related.
    Like in https://github.com/jonmosco/kube-ps1

  7. afbjorklund commented on Mar 15, 2020

    @afbjorklund
    Collaborator

    I guess this is now implemented, with MINIKUBE_ACTIVE_DOCKERD ?

    What needs to be done is a shell function to use it, similar to:
    https://gist.github.com/aburnett/1165239cd2673a43579c

    Then the user can use that in their PS1, similar to e.g. __git_ps1
    https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh

    One thing that is weird is that it shows the name of the profile (not host) ?

  8. removed this from the v1.9.0 March 24th milestone on Mar 18, 2020
  9. fejta-bot commented on Jun 16, 2020

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle stale

  10. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jun 16, 2020
  11. fejta-bot commented on Jul 16, 2020

    @fejta-bot

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle rotten

  12. added
    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Jul 16, 2020
  13. 19 remaining items

  14. JacekDuszenko commented on Jun 3, 2021

    @JacekDuszenko
    Contributor

    I would be happy to accept a PR that puts @afbjorklund 's suggestion to a nicely written tutorial.

    I'd happily add the tutorial.
    @medyagh which place in the docs would be the best to put it in? Could you post a link? Thanks

  15. spowelljr commented on Jun 23, 2021

    @spowelljr
    Member

    @JacekDuszenko We have a tutorial section on the minikube website here: https://minikube.sigs.k8s.io/docs/tutorials/

  16. JacekDuszenko commented on Jun 23, 2021

    @JacekDuszenko
    Contributor

    Cool, I'll add it there then /assign @JacekDuszenko

  17. JacekDuszenko commented on Jun 23, 2021

    @JacekDuszenko
    Contributor
  18. k8s-triage-robot commented on Sep 21, 2021

    @k8s-triage-robot

    The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

    This bot triages issues and PRs according to the following rules:

    • After 90d of inactivity, lifecycle/stale is applied
    • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
    • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

    You can:

    • Mark this issue or PR as fresh with /remove-lifecycle stale
    • Mark this issue or PR as rotten with /lifecycle rotten
    • Close this issue or PR with /close
    • Offer to help out with Issue Triage

    Please send feedback to sig-contributor-experience at kubernetes/community.

    /lifecycle stale

  19. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Sep 21, 2021
  20. spowelljr commented on Sep 21, 2021

    @spowelljr
    Member

    @JacekDuszenko Are you still working on this?

  21. added
    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.
    and removed
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.
    on Sep 21, 2021
  22. Rushali-Sarkar commented on Dec 17, 2025

    @Rushali-Sarkar

    Hi, is this issue still open ? Can I take this up as my first issue ?

  23. BlackBuck commented on Jan 27, 2026

    @BlackBuck

    Hi, @medyagh @JacekDuszenko
    anyone working on this issue currently? Would be happy to help!

  24. iacker commented on Apr 7, 2026

    @iacker

    I am working on a docs PR for this issue, focused on adding a small tutorial/tip to the minikube website around using MINIKUBE_ACTIVE_DOCKERD in the shell prompt, based on the guidance already discussed here. /assign

  25. Champbreed commented on Aug 21, 2026

    @Champbreed
    Member

    /Assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

co/docker-envdocker-env issuesgood first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.kind/documentationCategorizes issue or PR as related to documentation.kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions