Skip to content
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

docker-env script for tcsh is not correct #12308

Closed
ColleIsarco opened this issue Aug 19, 2021 · 5 comments · Fixed by #12332
Closed

docker-env script for tcsh is not correct #12308

ColleIsarco opened this issue Aug 19, 2021 · 5 comments · Fixed by #12332
Labels
co/docker-env docker-env issues help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@ColleIsarco
Copy link

ColleIsarco commented Aug 19, 2021

Steps to reproduce the issue:

  1. Login with default shell set to tcsh
  2. start minikube on docker: minikube start --driver=docker
  3. execute command to print out environment: minikube docker-env
  4. or name shell explicity: minikube docker-env --shell=tcsh

Full output of minikube logs command:
Not needed here...

Full output of failed command:

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:32771"
export DOCKER_CERT_PATH="/home/andi/.minikube/certs"
export MINIKUBE_ACTIVE_DOCKERD="minikube"

# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)

But the expected output should look like this:

setenv DOCKER_TLS_VERIFY "1"
setenv DOCKER_HOST "tcp://192.168.99.100:32771"
setenv DOCKER_CERT_PATH "/home/andi/.minikube/certs"
setenv MINIKUBE_ACTIVE_DOCKERD "minikube"

# To point your shell to minikube's docker-daemon, run:
# eval `minikube -p minikube docker-env`

In no Go-expert, but it seems that the source-codefor handling a (t)csh-shell differently than bash or similar shells is missing. The docker here is running on a vm, but at least by explicitly naming the shell I expect the correct script.

@afbjorklund
Copy link
Collaborator

I think support for csh was missed, when the command and shell was forked out from docker-machine.

c847979

So docker-machine env --shell=tcsh works, but minikube docker-env --shell=tcsh does not

Guess nobody uses csh...

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Aug 19, 2021
@afbjorklund
Copy link
Collaborator

$ docker-machine env --shell=bash
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.254:2376"
export DOCKER_CERT_PATH="/home/anders/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell: 
# eval $(docker-machine env --shell=bash)
$ docker-machine env --shell=tcsh
setenv DOCKER_TLS_VERIFY "1";
setenv DOCKER_HOST "tcp://192.168.99.254:2376";
setenv DOCKER_CERT_PATH "/home/anders/.docker/machine/machines/default";
setenv DOCKER_MACHINE_NAME "default";
: Run this command to configure your shell: 
: eval `docker-machine env --shell=tcsh`

Needs porting over to pkg/minikube/shell

@afbjorklund afbjorklund added the co/docker-env docker-env issues label Aug 19, 2021
@sharifelgamal
Copy link
Collaborator

yeah, this is just missing functionality in minikube, should be a pretty simple fix.

@sharifelgamal sharifelgamal added priority/backlog Higher priority than priority/awaiting-more-evidence. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. and removed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Aug 19, 2021
@sharifelgamal
Copy link
Collaborator

should be as simple as adding an entry for tsch in the map at https://github.com/kubernetes/minikube/blob/master/pkg/minikube/shell/shell.go#L60

@ColleIsarco
Copy link
Author

Thank you for fixing this issue so fast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-env docker-env issues help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants