CiscoDevNet / ydk-gen

Generate model-driven APIs from YANG models
http://ciscodevnet.github.io/ydk-gen/
Apache License 2.0
135 stars 74 forks source link

docker base image python error #1036

Closed ngrundler closed 2 years ago

ngrundler commented 3 years ago

Issue tracker is ONLY used for reporting bugs. Please use the YDK Community for any support issues.

Expected Behavior

root@5287af81935b:~/ydk-gen# ./generate.py --help
usage: generate.py [-h] [-l] [--core] [--service SERVICE] [--bundle BUNDLE]
                   [--adhoc-bundle-name ADHOC_BUNDLE_NAME]
                   [--adhoc-bundle ADHOC_BUNDLE [ADHOC_BUNDLE ...]]
                   [--generate-meta] [--generate-doc] [--generate-tests]
                   [--output-directory OUTPUT_DIRECTORY] [--cached-output-dir]
                   [-p] [-c] [-g] [-v] [-o] [-i] [-s]

Generate YDK artifacts:

optional arguments:
  -h, --help            show this help message and exit
...

Current Behavior

root@451e68594fd6:~/ydk-gen# ./generate.py --help
/usr/bin/env: 'python': No such file or directory

System Information

This was the default behavior when I pulled the docker image to a new dev machine. I'm no docker expert, but I'm wondering if the FROM ubuntu:bionic in the Dockerfile isn't specific enough and the bionic base image was updated and it removed the 'python' symlink?

If I add RUN ln -s /usr/bin/python3 /usr/bin/python to the Dockerfile and rebuild the image /usr/bin/env python works again and I can use the scripts again.

RedLine89 commented 3 years ago

I am experiencing the same issue