Public Repository

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

Full description is empty for this repo.

Docker Pull Command
Owner
yuanbluemood

Comments (1)
yuanbluemood
2 years ago

#设置继承镜像
FROM centos:centos6

#提供一些作者的信息
MAINTAINER liuchangfu

RUN cat /usr/share/zoneinfo/Asia/Kolkata >/etc/localtime
RUN yum install -y openssh-server
RUN mkdir -p /var/run/sshd
RUN mkdir -p /root/.ssh

#取消pam限制
RUN sed -ri 's/session required pam_loginuid.so/#session required pam_loginuid.so/g' /etc/pam.d/sshd

#配置tomcat运行环境
COPY java /usr/local/java
COPY tomcat /usr/local/tomcat
ADD profile /etc/profile
RUN mkdir -p /home/mobileweb/project
RUN echo 'hello world from docker' > /home/mobileweb/project/index.jsp
RUN mkdir -p /home/mobileweb/projectlogs
ADD apr.sh /apr.sh
RUN /bin/bash /apr.sh

#cms需求
ADD cms.sh /cms.sh
RUN /bin/bash /cms.sh
ADD aapt /usr/local/platform-tools/
ADD pngquant /usr/bin/
ADD gm /usr/local/bin/

#复制配置文件到相应位置,并赋予脚本可执行权限
ADD authorized_keys /root/.ssh/authorized_keys
ADD run.sh /run.sh
RUN chmod 755 /run.sh

#开放端口
EXPOSE 22 8080

#设置自启动命令
CMD ["/run.sh"]