同前一篇設定
此次改用docker來做php-fpm然後利用apache proxy來執行php程式
Docker 環境
debian
PHP 7.4
參考此Dockerfile
https://github.com/yappabe/docker-php
同前一篇設定
debian
PHP 7.4
https://github.com/yappabe/docker-php
This is a docker-compose yml,Integrated Mariadb、phpMyAdmin、tomcat
Docker
sudo docker-compose up -d --build
tomcat-webapps
directoryadmin / mypassword112233
myadmin123
8088
8080
;AJP port 8009
tomcat-webapps
github : https://github.com/catyku/JenkinsAgentMaven
docker hub :
docker pull catyku/jenkins-slave-maven3.5
FROM jenkins/jnlp-slave:latest USER root ARG USER_HOME_DIR="/jenkins" RUN apt-get update -y RUN apt-get install -y --no-install-recommends tzdata ENV TZ Asia/Taipei #RUN apt-get upgrade -y #RUN apt-get install -y software-properties-common #RUN add-apt-repository ppa:openjdk-r/ppa -y RUN apt-get install -y maven USER jenkins ENV MAVEN_HOME /usr/share/maven ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" COPY settings-docker.xml /usr/share/maven/ref/ USER jenkins ENTRYPOINT ["jenkins-slave"]Read More
https://github.com/catyku/AutoMavenBuild
Github的maven專案(私有)可以直接下載然後編譯成war deploy檔
需要安裝docker-ce
sudo docker build -t maven:project .
修改 FROM tomcat:8.5.49-jdk8-openjdk
加入 tomcat-users.xml 跟 manager的context.xml來取得manager/html存取權限
tomcat-users.xml為登入資訊
context.xml則管理存取ip等資訊
openjdk 1.8 tomcat 8.5
sudo docker build ./ -t yourname
and run
sudo docker run -d -p 8080:8080 --name tomcat catyku/tomcat:8.5-jre8