docker / dev-environments

60 stars 32 forks source link

Fingerprint prompt causes creating new dev environment from git clone to hang #100

Closed JDFagan closed 2 years ago

JDFagan commented 2 years ago

Describe the bug Fingerprint prompt causes creating new dev environment from git clone to hang:

Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
The authenticity of host 'github.com (192.30.255.112)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? 

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Dev Envinronments (Preview)'
  2. Click on 'Create New Environment'
  3. Click on 'Get Started'
  4. Choose 'Existing Git repo' and enter your git repo, then click on 'Continue'
  5. See fingerprint prompt (yes/no) causing it to hang (no ability to interact)

Expected behavior At step 5, have ability to interact with the prompt (or have ability to bypass this prompt somehow?)

Screenshots

fingerprint prompt hangs new dev env

Desktop (please complete the following information):

Version of Docker Desktop:
You can find the version by clicking on the About Docker Desktop menu

Docker Desktop 4.4.2 (73305) is currently the newest version available.

Docker Engine settings in case that helps:

DE version

Additional context Prior to above attempt, was trying to get devcontainers to work via Microsoft's documentation: https://code.visualstudio.com/docs/remote/create-dev-container#_automate-dev-container-creation but ran into issue of command that eventually was running by VSC tooling... docker ps -q -a --filter label=com.docker.compose.project=document_processing --filter label=com.docker.compose.service=document_processing

...which was curious error given that I see --filter flag is possible but when I run these commands below it complains about that arg not existing?!

$ docker ps -q -a --filter label=com.docker.compose.project=document_processing --filter label=com.docker.compose.service=document_processing                                                                                                             <<<
unknown flag: --filter
$ which docker
/usr/local/bin/docker
$ docker version
Client:
 Cloud integration: v1.0.22
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:46:56 2021
 OS/Arch:           darwin/amd64
 Context:           ds-staging
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.12
  Git commit:       459d0df
  Built:            Mon Dec 13 11:43:56 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
JDFagan commented 2 years ago

I think I figured out what my issue was. See Additional context section in my bug submission above. When I was doing steps to setup devcontainer for Visual Studio Code per Microsoft instructions, at one point I decided to see if messing with my docker context would help unstuck me and that seems to have been my issue for causing hang as described in this ticket.

See below commands I ran and now it seems I can properly create a new dev environment from git clone now:

$ docker context ls
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                KUBERNETES ENDPOINT                                                                                  ORCHESTRATOR
default             moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                    https://aks-app-cluster-stg-eastus-001-dns-a8756514.hcp.eastus.azmk8s.io:443 (datascience-staging)   swarm
desktop-linux       moby                                                          unix:///Users/jfagan/.docker/run/docker.sock
ds-staging *        aci                 rg-datascience-stg-eastus-001@eastus
$ docker context use default
default
$ docker context ls
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                KUBERNETES ENDPOINT                                                                                  ORCHESTRATOR
default *           moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                    https://aks-app-cluster-stg-eastus-001-dns-a8756514.hcp.eastus.azmk8s.io:443 (datascience-staging)   swarm
desktop-linux       moby                                                          unix:///Users/jfagan/.docker/run/docker.sock
ds-staging          aci                 rg-datascience-stg-eastus-001@eastus

Doing above commands where I reset my default docker context back to "default" helped resolve my issue. Hopefully this helps someone else in case the run into similar issue I did earlier today.