Mariadb Tomcat Docker environment

This is a docker-compose yml,Integrated Mariadb、phpMyAdmin、tomcat Docker

How to start

  • install docker-ce and docker-compose
  • change to project directory to build and run docker
    sudo docker-compose up -d --build
  • use phpMyAdmin restore database (options)
  • build project war file and put to tomcat-webapps directory
  • browse http://yourip:8080/warFileName

docker information

  • mariadb:latest
  • phpmyadmin/phpmyadmin:latest
  • tomcat:8.5.49-jkd8-openjdk

default information

  • tomcat manager account and password admin / mypassword112233
  • mariadb root default password myadmin123
  • phpMyAdmin default port 8088
  • tomcat default port 8080 ;AJP port 8009
  • tomcat workspace is tomcat-webapps
Read More

Jenkins use docker agent with maven Compile and build Environment

github :

docker hub :

docker pull catyku/jenkins-slave-maven3.5

Dockerfile include

  • openjdk 1.8
  • maven 3.5
  • jenkins/jnlp-slave


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

COPY settings-docker.xml /usr/share/maven/ref/

USER jenkins 

ENTRYPOINT ["jenkins-slave"]
Read More

GitHub Maven專案自動編譯成war檔

Github的maven專案(私有)可以直接下載然後編譯成war deploy檔


  • 取得及設定github ssh key可以參考以下這篇

  • 修改及設定使用者名稱及專案名稱 -> (記得mvn -P 的build config也要改成相對應的)
  • 產生docker image tag名稱為maven:project ,可自行修改
  sudo docker build -t maven:project .
  • github下載及編譯打包專案
Read More