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

dockers部署运行容器报错 #131

Open
1 task
tgy0728 opened this issue Jan 2, 2024 · 4 comments
Open
1 task

dockers部署运行容器报错 #131

tgy0728 opened this issue Jan 2, 2024 · 4 comments

Comments

@tgy0728
Copy link

tgy0728 commented Jan 2, 2024

How is Gemini Pro Chat deployed?

Docker

Describe the bug

把代码clone到本地后更改了两张图片改了下title,然后构建提交到本地镜像然后部署,run运行时提示Restarting (2) 1 second ago 始终启动不起来,并提示No such file or directoryr-env-replace.sh,尝试把CMD ["/bin/sh", "docker-entrypoint.sh"]的"/bin/sh"去掉,本地能启动成功,但是访问不了页面,去服务器部署了一遍,仍然是同样的结果。但是拉取作者的镜像就能启动访问,不知问题所在?

Console Logs

root@ip-172-31-30-138:/var/lib/docker# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3a8c9d3839aa c0bb89fc92e3 "docker-entrypoint.s…" 8 seconds ago Restarting (2) 1 second ago geminiprochat
root@ip-172-31-30-138:/var/lib/docker# ^C
root@ip-172-31-30-138:/var/lib/docker# docker logs 3a8c9d3839aa
: not foundypoint.sh: line 2:
: not foundypoint.sh: line 4:
: not foundypoint.sh: line 6:
': No such file or directoryr-env-replace.sh
: not foundypoint.sh: line 9: }
: not foundypoint.sh: line 10:
docker-entrypoint.sh: line 11: syntax error: unexpected word

Participation

  • I am willing to submit a pull request for this issue.
@tgy0728
Copy link
Author

tgy0728 commented Jan 2, 2024

解决了,因为docker-entrypoint.sh和env-replace.sh格式在windows中与linux中不同,需使用git的转换工具进行格式转换。

@KeyToLove
Copy link

解决了,因为docker-entrypoint.sh和env-replace.sh格式在windows中与linux中不同,需使用git的转换工具进行格式转换。

请问本地自行构建镜像的话,如何配置env呢?

@tgy0728
Copy link
Author

tgy0728 commented Jan 2, 2024

解决了,因为 docker-entrypoint.sh 和 env-replace.sh 格式在windows中与linux中不同,需使用git的转换工具进行格式转换。

请问本地自行构建镜像的话,如何配置env呢?
本地和linux都无需改动什么,.env里正常填api key就可以,不过如果也是clone下来的话,构建完运行容器没准会和我一样报错。

@brucelau1987cn
Copy link

version: '3'

services:
geminiprochat:
image: 'babaohuang/geminiprochat:latest'
container_name: geminiprochat
restart: always
ports:
- "3000:3000"
environment:
- GEMINI_API_KEY=KEY
# - HTTPS_PROXY=YOUR_HTTPS_PROXY
# - API_BASE_URL=YOUR_GEMINI_API_BASE_URL
# - HEAD_SCRIPTS=YOUR_HEAD_SCRIPTS
# - PUBLIC_SECRET_KEY=YOUR_SECRET_KEY
# - SITE_PASSWORD=YOUR_SITE_PASSWORD
# - OPENAI_API_MODEL=YOUR_OPENAI_API_MODEL

改成这样就行 不报错

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

3 participants