简体   繁体   中英

docker compose and jenkins

I have a Jenkins job I want to run docker-compose up for a deployment. When I run it I get the error:

[workspace] $ /bin/sh -xe /tmp/hudson5937783564331081987.sh
+ export DOCKER_HOST=tcp://localhost:4243
+ DOCKER_HOST=tcp://localhost:4243
+ /usr/bin/docker-compose up
Couldn't connect to Docker daemon at http://localhost:4243 - is it running?

but when I login as the jenkins user into the ssh, i can run docker-compose up without a problem...Any solution? I tried export DOCKER_HOST=tcp://localhost:4243 without luck.

I had the Sysop do the changes here

http://blog.csdn.net/qiyueqinglian/article/details/46559825

then I put in my jenkins job

export DOCKER_HOST=tcp://localhost:4243

Now it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM