diff --git a/README.md b/README.md index dce15a9..8e0604e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ # tml-in-docker # Dockerized TML Web System -### 安裝Docker +### 安裝Docker & Docker Compose +一般Linux $ wget -qO- https://get.docker.com/ | sh $ sudo usermod -aG docker $(whoami) $ sudo systemctl enable docker.service $ sudo systemctl start docker.service -### 安裝Docker Compose - $ sudo yum install epel-release $ sudo yum install -y python-pip $ 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 ```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 diff --git a/wildfly_tml/Dockerfile b/wildfly_tml/Dockerfile index e327e19..1842f6d 100755 --- a/wildfly_tml/Dockerfile +++ b/wildfly_tml/Dockerfile @@ -1,5 +1,5 @@ #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 COPY --chown=jboss . ${JBOSS_HOME}/config diff --git a/wildfly_tml/initial/setup.sh b/wildfly_tml/initial/setup.sh index 2a4ae3f..74104e9 100755 --- a/wildfly_tml/initial/setup.sh +++ b/wildfly_tml/initial/setup.sh @@ -6,12 +6,12 @@ earLibDir='lib' earMetaDir='META-INF' mkdir -p ${earDir}/${earLibDir} && mkdir -p ${earDir}/${earMetaDir} #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-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 #copy config files to META-INF cp -Rf ${JBOSS_HOME}/config/config/${earMetaDir} ${earDir} diff --git a/wildfly_tml_khhw/Dockerfile b/wildfly_tml_khhw/Dockerfile index e94c8a2..c9dc4c3 100644 --- a/wildfly_tml_khhw/Dockerfile +++ b/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 -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 COPY --chown=jboss . ${JBOSS_HOME}/config diff --git a/wildfly_tml_txgw/Dockerfile b/wildfly_tml_txgw/Dockerfile index c6a335e..f22a050 100644 --- a/wildfly_tml_txgw/Dockerfile +++ b/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 -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 COPY --chown=jboss . ${JBOSS_HOME}/config