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

想二次开发yapi的界面,发现无法进入yapi-web 容器里 #92

Open
wwb568109135 opened this issue Mar 10, 2022 · 2 comments
Open

Comments

@wwb568109135
Copy link

wwb568109135 commented Mar 10, 2022

[root@suhc-idesign-test /]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4de5aa364823 jayfong/yapi:latest "docker-entrypoint..." 3 hours ago Up 3 hours 0.0.0.0:40001->3000/tcp yapi-web
0f7817200ed6 mongo:latest "docker-entrypoint..." 3 hours ago Up 3 hours 27017/tcp yapi-mongo
fe63dc1a73fb alenx/walle-web:2.1 "nginx -g 'daemon ..." 7 days ago Up 7 days 0.0.0.0:9999->80/tcp walle-nginx
575aa517c43d alenx/walle-python:2.1 "bash -c 'cd /opt/..." 7 days ago Up 7 days 5000/tcp walle-python
543fc4b503ee mysql "docker-entrypoint..." 7 days ago Restarting (1) 2 days ago walle-mysql
3f4d78f03eb0 star7th/showdoc "/entrypoint /bin/..." 7 days ago Up 7 days 443/tcp, 9000/tcp, 0.0.0.0:4999->80/tcp showdoc-demo-wwb
29516d5cbc6b docker.io/redis "docker-entrypoint..." 8 days ago Exited (0) 7 days ago redis-wwb
9d62627f666f mongo "docker-entrypoint..." 8 days ago Exited (0) 8 days ago mongo-test-wwb
eb1fa08c15be docker.io/python "/bin/bash" 8 days ago Exited (130) 8 days ago python-test-wwb
448919626e39 mysql "docker-entrypoint..." 8 days ago Exited (0) 8 days ago mysql-test
59764fdac94b nginx "/docker-entrypoin..." 8 days ago Exited (0) 8 days ago nginx-test
88e339b454cc gogs/gogs "/app/gogs/docker/..." 3 months ago Up 7 days 0.0.0.0:11022->22/tcp, 0.0.0.0:11080->3000/tcp gogs
[root@suhc-idesign-test /]#
[root@suhc-idesign-test /]# docker exec -it yapi-web bash
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:235: starting container process caused "exec: "bash": executable file not found in $PATH"

如下图:
image

@wwb568109135
Copy link
Author

image

docker exec -it yapi-web /bin/sh 为什么这样执行 就可以进去了容器了呀

@wang-xiaowu
Copy link

基础镜像是alpine,默认可使用的shell类型不包含bash
可以使用cat /etc/shells查看可使用的shell类型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants