Estou seguindo as instruções aqui , usando o 'docker run'.
Eu fiz o seguinte. O contêiner é iniciado e, em seguida, pára. o que estou perdendo? Nesse caso, o status do systemctl mostra a cauda de um log; onde está o resto desse log?
[Unit]
Description=Jenkins
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker run -d -p 49001:8080 -v /var/jenkins_home:/var/jenkins_home -t jenkins
ExecStop=/usr/bin/docker stop -t 2 jenkins
#ExecStopPost=/usr/bin/docker rm -rf jenkins
[Install]
WantedBy=default.target
Consegui obter dados mais úteis do status. Mas estou intrigado: posso copiar e colar a linha de comando do ExecStart e ela funciona, mas o systemctl relata esse status de saída.
docker-jenkins.service - Jenkins
Loaded: loaded (/etc/systemd/system/docker-jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2016-10-26 08:45:58 EDT; 4s ago
Process: 23529 ExecStopPost=/usr/bin/docker rm -f jenkins_server (code=exited, status=1/FAILURE)
Process: 23521 ExecStop=/usr/bin/docker stop -t 2 jenkins_server (code=exited, status=1/FAILURE)
Process: 23516 ExecStart=/usr/bin/docker run -d -p 49001:8080 -v /var/jenkins_home:/var/jenkins_home --env JAVA_OPTS="-Djavax.net.ssl.trustStore=/var/jenkins_home/.keystore/cacerts -Djavax.net.ssl.trustStorePassword=changeit" --name jenkins_server jenkins (code=exited, status=125)
Main PID: 23516 (code=exited, status=125)
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Unit docker-jenkins.service entered failed state.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service failed.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service holdoff time over, scheduling restart.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: start request repeated too quickly for docker-jenkins.service
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Failed to start Jenkins.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Unit docker-jenkins.service entered failed state.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service failed.