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

docker-compose一键部署出错 #6

Open
steady298 opened this issue Feb 21, 2023 · 9 comments
Open

docker-compose一键部署出错 #6

steady298 opened this issue Feb 21, 2023 · 9 comments

Comments

@steady298
Copy link

docker-compose up -d

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.gvb-server.ports is invalid: Invalid port "5678 # 前台服务端口:5678 # 前台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.ports is invalid: Invalid port "8765 # 后台服务端口:8765 # 后台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.depends_on contains an invalid type, it should be an array
[root@chatbot start]#

@szluyu99
Copy link
Owner

请重新拉取一下最近的项目,最近重新测试了一下,应该没有问题

@richgene
Copy link

richgene commented Mar 2, 2023

ERROR [builder 4/4] RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct && go mod tidy && go build -o server . 0.3s

[builder 4/4] RUN go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct && go mod tidy && go build -o server .:
#11 0.236 go mod tidy: go.mod file indicates go 1.19, but maximum supported version is 1.17

@szluyu99
Copy link
Owner

把用 docker-compose 一键运行模块重新整理了一下,应该没问题了

Linux 下可以正常启动:(Windows 请使用 GitBash 进行操作)

git clone https://github.com/szluyu99/gin-vue-blog 
cd gin-vue-blog/deploy
./bootstrap.sh

@cyf-2002
Copy link

部署 gvb-server 的时候这一行报错了 提示我 /gvb 下没有go文件 这个WORKDIR是不是要做修改
RUN go build -o server .

@szluyu99
Copy link
Owner

后端重构了一下,拉取最新项目应该可以了

@180abcd
Copy link

180abcd commented Apr 6, 2024

macbook@bogon deploy % ./bootstrap.sh
未找到容器 gvb-web
未找到容器 gvb-server
未找到容器 gvb-redis
未找到容器 gvb-mysql
本项目相关 Docker 容器清理完成
open /Users/macbook/.docker/buildx/current: permission denied 这是为啥

@chicc4923
Copy link

macbook@bogon deploy % ./bootstrap.sh 未找到容器 gvb-web 未找到容器 gvb-server 未找到容器 gvb-redis 未找到容器 gvb-mysql 本项目相关 Docker 容器清理完成 open /Users/macbook/.docker/buildx/current: permission denied 这是为啥

给个权限试试

@chicc4923
Copy link

后端重构了一下,拉取最新项目应该可以了

今天尝试了一下,还是会出现这个问题,两个分支都一样。

[root@master deploy]# ./bootstrap.sh
未找到容器 gvb-web
未找到容器 gvb-server
未找到容器 gvb-redis
未找到容器 gvb-mysql
本项目相关 Docker 容器清理完成
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.gvb-server.ports is invalid: Invalid port "5678 # 前台服务端口:5678 # 前台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.ports is invalid: Invalid port "8765 # 后台服务端口:8765 # 后台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.depends_on contains an invalid type, it should be an array

系统信息如下:

[root@master deploy]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Docker 版本如下:

[root@master deploy]# docker --version
Docker version 25.0.3, build 4debf41
[root@master deploy]#

@chicc4923
Copy link

后端重构了一下,拉取最新项目应该可以了

今天尝试了一下,还是会出现这个问题,两个分支都一样。

[root@master deploy]# ./bootstrap.sh
未找到容器 gvb-web
未找到容器 gvb-server
未找到容器 gvb-redis
未找到容器 gvb-mysql
本项目相关 Docker 容器清理完成
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.gvb-server.ports is invalid: Invalid port "5678 # 前台服务端口:5678 # 前台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.ports is invalid: Invalid port "8765 # 后台服务端口:8765 # 后台服务端口", should be [[remote_ip:]remote_port[-remote_port]:]port[/protocol]
services.gvb-server.depends_on contains an invalid type, it should be an array

系统信息如下:

[root@master deploy]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

Docker 版本如下:

[root@master deploy]# docker --version
Docker version 25.0.3, build 4debf41
[root@master deploy]#

后续更新:只需要把docker-compose 文件中的version字段从3改为2.1即可

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

6 participants