cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
383
Views
10
Helpful
2
Replies
miott
Cisco Employee

YANG Suite docker install on Windows 10

The YANG Suite team will not be distributing a docker image to dockerhub but there is a docker recipe to build your own docker containers using docker-compose and dockerfile which can be retrieved from the CiscoDevNet/yangsuite Git repository.  Building this container on Windows 10 has special challenges.  Here are a couple things Windows 10 users had to do to get this working.

 

Doing the"git clone" has an issue with CRLF and you can workaround it with the following command in the gitshell:

git config --global core.eol lf
git config --global core.autocrlf input
find . -type f -print0 | xargs -0 dos2uni

The next issue you may run into is your network finding "docker.io".  You can add docker.io to a couple of "hosts" files.

C:\Windows\System32\drivers\etc\hosts

/etc/hosts # from gitshell

192.168.65.1:53 registry-1.docker.io
#34.228.211.243  registry-1.docker.io
# Added by Docker Desktop
192.168.0.105 host.docker.internal
192.168.0.105 gateway.docker.internal
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal

Let us know if you run into other Windows 10 issues.

2 REPLIES 2
clogsdon
Cisco Employee

Part of the YANG Suite installation is generating a self-signed certificate and key with yangsuite/docker/gen_test_certs.sh.  This shell script uses openssl.


The openssl project doesn't have a native Windows version.  There are third party versions, but I didn't want to use them.  Instead, I used the Linux openssl in my Ubuntu under WSL2 (Windows Subystem for Unix).

miott
Cisco Employee

Couple more things.

  1. Make sure the "getting-started" container in the tutorial works before you try to start YANG Suite.  If you skipped the tutorial, you can run the getting-started container from a command or powershell window by typing in: docker run -d -p 80:80 docker/getting-started After that loads and runs successfully you can access the container through your browser at http://localhost:80.  Has a lot of great information about docker.  If that works, YANG Suite containers should work.
  2. Loading large YANG models may be too much for a Windows laptop with less than 8GB of RAM so if starting up works and loading small models works but large model returns an HTTP error, that is most likely your problem.
Content for Community-Ad