Tengo un contenedor jenkins dockerizado detrás del proxy inverso Nginx dockerizado que funciona perfectamente con http pero arroja ERR_SSL_PROTOCOL_ERROR cuando intento obtener la URL de jenkins con https. Utilicé certificados autofirmados
mi jenkins Dockerfile:
LABEL maintainer="barrybhoye@gmail.com" ENV JAVA_OPTS="-Xmx8192m" ENV JENKINS_OPTS=" --handlerCountMax=300" USER root RUN mkdir /var/log/jenkins RUN mkdir /var/cache/jenkins RUN chown -R jenkins:jenkins /var/cache/jenkins RUN chown -R jenkins:jenkins /var/log/jenkins USER jenkins ENV JENKINS_OPTS="--handlerCountMax=300 --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war"mi Nginx Dockerfile:
LABEL maintainer="barrybhoye@gmail.com" RUN yum -y update; yum clean all RUN yum -y install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm; yum -y makecache RUN yum -y install nginx-1.10.1 RUN rm /etc/nginx/conf.d/default.conf COPY conf/jenkins.conf /etc/nginx/conf.d/jenkins.conf COPY conf/nginx.conf /etc/nginx/nginx.conf EXPOSE 80 EXPOSE 443 CMD ["nginx"]mi ventana acoplable componer:
services: master: build: ./jenkins-master ports: - "8080:8080" - "50000:50000" volumes: - jenkins-log:/var/log/jenkins - jenkins-data:/var/jenkins_home - ./certs:/etc/nginx/ssl networks: - jenkins-net nginx: build: ./jenkins-nginx ports: - "80:80" - "443:443" networks: - jenkins-net volumes: jenkins-data: jenkins-log: networks: jenkins-net:mi conferencia de jenkins:
listen 80; listen 443 ssl; server_name domaine; ssl_certificate /etc/nginx/ssl/cert.crt; ssl_certificate_key /etc/nginx/ssl/cert.key; ssl_verify_client off; ssl_protocols TLSv1.2; ssl_prefer_server_ciphers on; ssl_dhparam /etc/nginx/ssl/dhparam.pem; ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384; location / { proxy_pass http://domaine:8080; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }mi configuración de nginx:
user nginx; worker_processes 2; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; use epoll; accept_mutex off; } http { include /etc/nginx/mime.types; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; #tcp_nopush on; keepalive_timeout 65; include /etc/nginx/conf.d/*.conf; }