run docker commands from command prompt versus jenkins script -
i have test ubuntu server docker-machine installed. have number of docker containers running on servers. including jenkins container. run jenkins following command
docker run -d --name jenkins -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker --restart=always -p 8080:8080 -v ~/jenkinshome:/var/jenkins_home docker-jenkins
i working on managing images through jenkins. can start 1 of containers via jenkins shell script. 1 container fails appears start in script (i docker ps after docker run in script). however, container stops after script completes. using same docker run command works on command prompt, fails in jenkins script:
sudo docker run -d --net=host -v ~/plex-config:/config -v ~/media:/media -p 32400:32400 wernight/plex-media-server
i have double checked folder permissions , correct. can direct me possible reasons run command failing in jenkins, not @ command prompt?
using docker ps =a
able id stopped container. using docker logs
able see error folder permission issue. digging deeper, user permission error mis-match between user jenkins runs inside it's container not being able pass folder correctly. have decided circumvent problem using docker stop , start commands , not using docker run command.
Comments
Post a Comment