Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

提交bug。docker-compose不能使用 #317

Closed
alilovetaozi opened this issue Nov 23, 2022 · 2 comments
Closed

提交bug。docker-compose不能使用 #317

alilovetaozi opened this issue Nov 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@alilovetaozi
Copy link

, compose_env_port=json.dumps(compose_env_port), original_yml=json.dumps(yaml.load(args,Loader=yaml.FullLoader)))
中original_yml=json.dumps(yaml.load(args,Loader=yaml.FullLoader)) original_yml 是 docker-compose转成对象后又转成json的字符串。984行调用tasks.create_compose_task。
图片
https://github.com/fofapro/vulfocus/blob/master/vulfocus-api/tasks/tasks.py#L140运行到这里,按照原文的意思,这里 args_yaml应该是一个python对象,args_yaml = new_yaml.load(json.loads(image_info.original_yml))处理时。先将前面的json字符串格式转成json对象,然后用yaml.load()加载,这里面并不是yaml格式字符串。看后面的处理,这里直接用json对象也行。于是删除yaml.load 改成 args_yaml = json.loads(image_info.original_yml) 就行了。
图片
修改后这里就成功了,并且也能用
图片

图片
图片
图片

@xxxxbxxxxx
Copy link
Contributor

docker-compose 不推荐使用,建议制作镜像的时候采用 Docker in Docker

@alilovetaozi
Copy link
Author

有这功能就想着用一下。其实用起来还行,可能还有bug。有时间再调一下。

@fofapro fofapro locked and limited conversation to collaborators Nov 27, 2022
@xxxxbxxxxx xxxxbxxxxx converted this issue into discussion #319 Nov 27, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants