Browse Source

1. 更新docker & docker-compose安裝方式(RHEL)

2. docker registry/sentry environment抽出為變數
3. WHL_TML.ear移除不避要的jar file
master
Richard Shih 6 years ago
parent
commit
5a5ee76c72
5 changed files with 24 additions and 12 deletions
  1. 18
      README.md
  2. 2
      wildfly_tml/Dockerfile
  3. 8
      wildfly_tml/initial/setup.sh
  4. 4
      wildfly_tml_khhw/Dockerfile
  5. 4
      wildfly_tml_txgw/Dockerfile

18
README.md

@ -1,19 +1,31 @@
# tml-in-docker # # tml-in-docker #
Dockerized TML Web System Dockerized TML Web System
### 安裝Docker
### 安裝Docker & Docker Compose
一般Linux
$ wget -qO- https://get.docker.com/ | sh $ wget -qO- https://get.docker.com/ | sh
$ sudo usermod -aG docker $(whoami) $ sudo usermod -aG docker $(whoami)
$ sudo systemctl enable docker.service $ sudo systemctl enable docker.service
$ sudo systemctl start docker.service $ sudo systemctl start docker.service
### 安裝Docker Compose
$ sudo yum install epel-release $ sudo yum install epel-release
$ sudo yum install -y python-pip $ sudo yum install -y python-pip
$ sudo pip install docker-compose $ sudo pip install docker-compose
Redhat RHEL 7
$ yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
$ yum makecache fast
$ yum install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.42-1.gitad8f0f7.el7.noarch.rpm
$ yum install docker-ce
$ yum install docker-compose
##### 若docker host在proxy之後
請參考 https://docs.docker.com/config/daemon/systemd/#custom-docker-daemon-options
### 安裝Rancher CLI ### 安裝Rancher CLI
```bash ```bash
curl -LkSs https://github.com/rancher/cli/releases/download/v0.6.11/rancher-linux-amd64-v0.6.11.tar.gz | tar -xz && mv ./rancher-v0.6.11/rancher /bin/rancher && rm -rf ./rancher-v0.6.11 curl -LkSs https://github.com/rancher/cli/releases/download/v0.6.11/rancher-linux-amd64-v0.6.11.tar.gz | tar -xz && mv ./rancher-v0.6.11/rancher /bin/rancher && rm -rf ./rancher-v0.6.11

2
wildfly_tml/Dockerfile

@ -1,5 +1,5 @@
#FROM shihxuancheng/wildfly-base:latest #FROM shihxuancheng/wildfly-base:latest
FROM khhwtml02t.wanhai.com:8182/jboss/wildfly-base:latest
FROM ${docker_rep_url}/jboss/wildfly-base:latest
#prepare tmp dir #prepare tmp dir
COPY --chown=jboss . ${JBOSS_HOME}/config COPY --chown=jboss . ${JBOSS_HOME}/config

8
wildfly_tml/initial/setup.sh

@ -6,12 +6,12 @@ earLibDir='lib'
earMetaDir='META-INF' earMetaDir='META-INF'
mkdir -p ${earDir}/${earLibDir} && mkdir -p ${earDir}/${earMetaDir} mkdir -p ${earDir}/${earLibDir} && mkdir -p ${earDir}/${earMetaDir}
#copy libraries to lib path #copy libraries to lib path
curl -# -o ${earDir}/${earLibDir}'/commons-logging-1.1.1.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
curl -# -o ${earDir}/${earLibDir}'/log4j-1.2.17.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/log4j/log4j/1.2.17/log4j-1.2.17.jar
curl -# -o ${earDir}/${earLibDir}'/sentry-log4j-1.7.3.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/io/sentry/sentry/1.7.3/sentry-1.7.3.jar
#curl -# -o ${earDir}/${earLibDir}'/commons-logging-1.1.1.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
#curl -# -o ${earDir}/${earLibDir}'/log4j-1.2.17.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/log4j/log4j/1.2.17/log4j-1.2.17.jar
# curl -# -o ${earDir}/${earLibDir}'/sentry-log4j-1.7.3.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/io/sentry/sentry/1.7.3/sentry-1.7.3.jar
curl -# -o ${earDir}/${earLibDir}'/tml-security.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/tml-security/0.1.0/tml-security-0.1.0.jar curl -# -o ${earDir}/${earLibDir}'/tml-security.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/tml-security/0.1.0/tml-security-0.1.0.jar
curl -# -o ${earDir}/${earLibDir}'/tml-utility.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/tml-utility/0.1.0/tml-utility-0.1.0.jar curl -# -o ${earDir}/${earLibDir}'/tml-utility.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/tml-utility/0.1.0/tml-utility-0.1.0.jar
curl -# -o ${earDir}/${earLibDir}'/zuljsp.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/org/zkoss/zk/zuljsp/2.6.0/zuljsp-2.6.0.jar
#curl -# -o ${earDir}/${earLibDir}'/zuljsp.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/org/zkoss/zk/zuljsp/2.6.0/zuljsp-2.6.0.jar
curl -# -o ${earDir}'/whl-biztml.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/whl-biztml/0.1.0/whl-biztml-0.1.0.jar curl -# -o ${earDir}'/whl-biztml.jar' http://khhwtml02t.wanhai.com:8181/repository/maven-public/com/wanhai/tml/whl-biztml/0.1.0/whl-biztml-0.1.0.jar
#copy config files to META-INF #copy config files to META-INF
cp -Rf ${JBOSS_HOME}/config/config/${earMetaDir} ${earDir} cp -Rf ${JBOSS_HOME}/config/config/${earMetaDir} ${earDir}

4
wildfly_tml_khhw/Dockerfile

@ -1,7 +1,7 @@
FROM khhwtml02t.wanhai.com:8182/jboss/wildfly-tml:latest
FROM ${docker_rep_url}/jboss/wildfly-tml:latest
#set environment #set environment
ENV JAVA_OPTS="-Dcom.wanhai.tml.yard.current=KHHW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat"
ENV JAVA_OPTS="-Dcom.wanhai.tml.yard.current=KHHW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=${profile}"
#prepare tmp dir #prepare tmp dir
COPY --chown=jboss . ${JBOSS_HOME}/config COPY --chown=jboss . ${JBOSS_HOME}/config

4
wildfly_tml_txgw/Dockerfile

@ -1,7 +1,7 @@
FROM khhwtml02t.wanhai.com:8182/jboss/wildfly-tml:latest
FROM ${docker_rep_url}/jboss/wildfly-tml:latest
#set environment #set environment
ENV JAVA_OPTS="-Dcom.wanhai.tml.yard.current=TXGW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=uat"
ENV JAVA_OPTS="-Dcom.wanhai.tml.yard.current=TXGW -Dsentry.dsn=http://d5756310a31a47909989df81461b1da1:bfb176b900fb498c8e3b60d31d12c23f@khhwtml02t.wanhai.com:9000/2 -Dsentry.stacktrace.app.packages=com.wanhai.tml -Dsentry.release=0.1.0 -Dsentry.environment=${profile}"
#prepare tmp dir #prepare tmp dir
COPY --chown=jboss . ${JBOSS_HOME}/config COPY --chown=jboss . ${JBOSS_HOME}/config

Loading…
Cancel
Save