Remarquez comment créer un environnement Jenkins avec Docker
Voir l'article ci-dessous [Linux] Construction de l'environnement Docker sur Redhat
version: '3'
services:
apache:
build: apache
container_name: apache
ports:
- 80:80
volumes:
- ./apache/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf
- ./apache/conf/modules.conf:/usr/local/apache2/conf/modules.conf
- ./apache/conf/proxy.conf:/usr/local/apache2/conf/proxy.conf
jenkins:
build: jenkins
container_name: jenkins
volumes:
- ./jenkins/jenkins_home:/var/jenkins_home
environment:
- JENKINS_OPTS=--prefix=/Jenkins/ --sessionTimeout=1440
- TZ=Asia/Tokyo
privileged: true
apache
FROM httpd:latest
RUN apt update \
&& apt install -y \
git \
gcc \
make \
build-essential \
wget \
curl \
llvm \
xz-utils \
tk-dev \
zlib1g-dev \
libncurses5-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxmlsec1-dev \
liblzma-dev \
libpq-dev \
libffi-dev
WORKDIR /usr/local/apache2
jenkins
FROM jenkins/jenkins:lts
WORKDIR /
USER root
RUN apt-get update \
&& apt-get install -y \
gcc \
g++ \
expect \
make \
file \
chromium \
chromium-driver \
libpq-dev \
libssl-dev \
libbz2-dev \
libffi-dev \
zlib1g-dev \
liblzma-dev
WORKDIR /var/jenkins_home
EXPOSE 8080
./apache/conf/httpd.conf
・ ・ ・
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/modules.conf <== ajouté
・ ・ ・
IncludeOptional conf/proxy.conf <== ajouté
./apache/conf/modules.conf
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
./apache/conf/proxy.conf
# jenkins
<Location "/Jenkins">
<IfModule proxy_module>
ProxyPass http://jenkins:8080/Jenkins
ProxyPassReverse http://jenkins:8080/Jenkins
</IfModule>
</Location>
OK si vous pouvez accéder à jenkins à l'URL suivante
http://localhost/Jenkins
Recommended Posts