-
Notifications
You must be signed in to change notification settings - Fork 445
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
Add dockerfile to agent-docker and Fix some bugs #192
Conversation
Signed-off-by: XuHugo <xq-310@163.com>
|
||
app = Flask(__name__) | ||
PASS_CODE = 'OK' | ||
FAIL_CODE = 'Fail' | ||
|
||
client = docker.from_env() | ||
docker_url = os.getenv("DOCKER_URL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the default value of DOCKER_URL
set? @XuHugo
@@ -0,0 +1,5 @@ | |||
[global] | |||
index-url=http://mirrors.cloud.aliyuncs.com/pypi/simple/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not necessary as developers are in different regions.
there is no default value,when the user starts the container,this parameter is passed in。and then if you use from_env,failed to complie docker。
| |
许强
|
|
邮箱:xq-310@163.com
|
签名由 网易邮箱大师 定制
On 11/09/2020 12:10, Dixing (Dex) Xu wrote:
@dexhunter commented on this pull request.
In src/agent/docker-rest-agent/server.py:
app = Flask(__name__)
PASS_CODE = 'OK'
FAIL_CODE = 'Fail'
-client = docker.from_env()
+docker_url = os.getenv("DOCKER_URL")
where is the default value of DOCKER_URL set? @XuHugo
In src/agent/docker-rest-agent/pip.conf:
@@ -0,0 +1,5 @@
+[global]
+index-url=http://mirrors.cloud.aliyuncs.com/pypi/simple/
I think this is not necessary as developers are in different regions.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I see. Since I was using it natively, I didn't consider the case of assembling into an image. Anyways, the CI failure is irrelevant to this change. I think you can restart the CI to see if the problem persists. |
gunicorn==20.0.4 | ||
zope.event==4.5.0 | ||
zope.interface==5.1.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I am wondering if all those packages are necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the production environment, gunicorn is generally used to deploy the flask service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I understand the usage of gunicorn
but what I mean is that since you added multiple dependencies (3->22), are all those dependencies necessary? Well, all can keep for now, until some one is not used anymore. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all of them are necessary. For example, jinja2 will also be installed when you want to install flask. the requirements.txt is produced automatically;If you feel that you don't have to, you can leave them out, and it won't have any effect.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
The error was |
|
/azp run |
Commenter does not have sufficient privileges for PR 192 in repo hyperledger/cello |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@XuHugo @dexhunter |
Signed-off-by: Dixing (Dex) Xu <dixingxu@gmail.com>
Signed-off-by: Dixing (Dex) Xu <dixingxu@gmail.com>
@XuHugo Please rebase to the master branch and force push again. Thanks! |
Signed-off-by: XuHugo <xq-310@163.com>
ok,I'll fix it |
Signed-off-by: XuHugo xq-310@163.com
If we use agent docker, we should replace from_ env() with dockerclient()。
When the image is generated, we do not know the IP address of the docker server; therefore, we need to pass in the IP address when running.