Skip to content
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

SSL/TLS httpPort(s) options not working #1019

Open
FF186 opened this issue Nov 5, 2020 · 4 comments
Open

SSL/TLS httpPort(s) options not working #1019

FF186 opened this issue Nov 5, 2020 · 4 comments

Comments

@FF186
Copy link

FF186 commented Nov 5, 2020

Issues and Contributing

Please note that only issues related to this Docker image will be addressed here.

  • If you have Docker related issues, please ask in the Docker user mailing list.
  • If you have Jenkins related issues, please ask in the Jenkins mailing lists.
  • If you are not sure, then this is probably not the place to create an issue and you should use any of the previously mentioned mailing lists.

If after going through the previous checklist you still think you should create an issue here please provide:

Not able to get ssl/tls on my jenkins docker container using your example nor the example from StackOverflow:

Docker commands that you execute

Dockerfile

FROM jenkins/jenkins:lts

COPY https.pem /var/lib/jenkins/cert
COPY https.key /var/lib/jenkins/pk
ENV JENKINS_OPTS --httpPort=-1 --httpsPort=8083 --httpsCertificate=/var/lib/jenkins/cert --httpsPrivateKey=/var/lib/jenkins/pk
EXPOSE 8083

other run

docker run -p 443:8443 jenkins --httpPort=-1 --httpsPort=8443 --httpsKeyStore=/var/jenkins_home/jenkins_keystore.jks --httpsKeyStorePassword=mypassword

Actual result

PORTS
 8080/tcp, 50000/tcp, 0.0.0.0:443->8083/tcp

Not able to reach on port 443 because jenkins is expecting port 8080...

Expected outcome

50000/tcp, 0.0.0.0:443->8083/tcp

Output of docker version

Docker version 19.03.8, build afacb8b

@Sam-Mumm
Copy link

I am facing the same problem did someone already found a solution for this problem?

@DuMaM
Copy link

DuMaM commented Feb 23, 2022

#1292
Please try :)

@rajeshhazari
Copy link

rajeshhazari commented Jan 27, 2023

This worked for me with my custom build jenkins docker : jenkins:rh-lts, this image does have docker client installed and mapping to jenkins uid to image uid and docker guid to image guid (I still get permission issue), ssl works when I've mounted the jks file.

my custom image jenkins:rh-lts was built from jenkins:lts

docker container run -d --restart unless-stopped -u jenkins:jenkins --network transcribe_internal -p 8777:443 -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker -v ${HOME}/.ssh/known_hosts:/etc/ssh/ssh_known_hosts -v /media/data-sdc3/jenkins-data/:/var/jenkins_home -v /opt/apps/:/opt/apps/:rw --env JAVA_OPTS="-Xmx2048m" --env JENKINS_OPTS="--httpPort=-1 --httpsKeyStore=/opt/apps/jenkins/ssl/devappserver-jenkins.jks --httpsKeyStorePassword=admin111 --httpsPort=443 --handlerCountMax=300 --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/jenkins_home/logs/access_log" --name jenkins-devappserver jenkins:rh-lts

I still get docker permission error with the below docker cmd in a job, any help here would be appreciated:

docker inspect -f . maven:3.8.7-eclipse-temurin-11

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/maven:3.8.7-eclipse-temurin-11/json": dial unix /var/run/docker.sock: connect: permission denied

@allseasonsleaf
Copy link

Developers have changed the parameters for the upgrade of jetty server: "Winstone 6.1: Upgrade Jetty from 9.4.46.v20220331 to 10.0.11" --> jenkinsci/jenkins#6801
The flags --httpsPrivateKey and --httpsCertificate have been REPLACED with --httpsKeyStore and --httpsKeyStorePassword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants