Dockerfile
1.24 KB
FROM ccr.ccs.tencentyun.com/yoho-base/tomcat:8.5.4
MAINTAINER jimi <jimi.ji@yoho.cn>
RUN groupadd -r master && useradd -d /home/master master -g master && chmod 777 /home/master && \
yum install -y openssh-clients
COPY monitor-service-web/target/monitor.war /usr/local/tomcat/webapps/monitor.war
RUN chown -R master:master /usr/local/tomcat
RUN mkdir -p /home/master/ops_sh/script/oneKeySwitch/ && \
mkdir -p /home/master/ops_sh/store-nginx-conf/ && \
mkdir -p /home/master/ops_sh/nginx-conf/ && \
sed -i 's/# StrictHostKeyChecking ask/ StrictHostKeyChecking no/g' /etc/ssh/ssh_config
ADD idc-switch/oneKeySwitch/ /home/master/ops_sh/script/oneKeySwitch/
ADD nginx-switch/* /home/master/ops_sh/
ADD nginx-conf/ /home/master/ops_sh/nginx-conf/
ADD id_rsa.pub /home/master/.ssh/id_rsa.pub
ADD id_rsa /home/master/.ssh/id_rsa
RUN mkdir -p /home/master/logs/java/monitor-service && \
chown -R master:master /usr/local/tomcat && \
chown -R master:master /home/master && \
chmod +x /home/master/ops_sh/script/oneKeySwitch/* && \
chmod +x /home/master/ops_sh/* && \
chmod +x /home/master/ops_sh/nginx-conf/* && \
chmod 700 /home/master/.ssh/id_rsa.pub && \
chmod 400 /home/master/.ssh/id_rsa
EXPOSE 8080
USER master