Unable to run Jenkins inside docker container through ansible

22 views
Skip to first unread message

Bishwajit Samanta

unread,
May 21, 2018, 9:12:56 AM5/21/18
to Jenkins Users
Dear All,

I am not able to run jenkins inside docker container using ansible playbook. Jenkins is getting started but unable to run it 


- name: Download Jenkins Container
  docker_container: 
    name: Jenkins_server 
    image: jenkins 
    state: started 
    ports: 
      - "8080:8080"
      - "50000:50000"
    command: sleep 1d 
    volumes: 
      - /data 

This is starting the container but not able to run jenkins due to which i am not able to login to jenkins host.

Can anyone guide me what do to ?

Ramanathan Muthaiah

unread,
May 21, 2018, 11:11:47 AM5/21/18
to Jenkins Users
This is starting the container but not able to run jenkins due to which i am not able to login to jenkins host.

Can anyone guide me what do to ?

Have you looked at the Docker container logs? 

/Ram

Victor Martinez

unread,
May 23, 2018, 4:15:46 PM5/23/18
to Jenkins Users
Although this is not a question about using jenkins itself but how to use ansible and more specifically using the docker_container task. It smells like the command parameter is overriding the default behaviour of the jenkins image...

My two cents
Reply all
Reply to author
Forward
0 new messages