dockerfile的一些基本运用

 
[root@redhat7 ~]# vim Dockerfile

FROM centos:7
MAINTAINER Liuliubin

ADD ./apache-tomcat-7.0.99.tar.gz /root
ADD ./jdk-7u80-linux-x64.tar.gz /root

ENV JAVA_HOME /root/jdk1.7.0_80
ENV PATH $JAVA_HOME/bin:$PATH

EXPOSE 8080

ENTRYPOINT /root/apache-tomcat-7.0.99/bin/startup.sh && tail -f /root/apache-tomcat-7.0.99/logs/catalina.out

  

 

  运行:

docker build -t tomcat:v1.0 .

 

posted @ 2021-05-19 23:30  看见酵母菌  阅读(58)  评论(0编辑  收藏  举报