Creating Tomcat image in dockerfile

Time:2021-2-25

A step of installing Tomcat image

  1. Prepare image file

    Tomcat package JDK package
    Put it in the same folder as the dockfile
    There’s no paper here. It’s everywhere

  2. Write dockerfile
VIM dockerfile # officially recommended name

#Type the following command in the VIM text edit box

FROM centos
MAINTAINER Yang<[email protected]>

COPY /user/local/myInfo.txt /user/local/myInfo.txt

ADD jdk-8ull-linux-x64.tar.gz /user/local/
ADD apache-tomcat-9.0.22.tar.gz /usr/loacl/

RUN yum -y install vim

ENV MYPATH /user/local

WORKPATH $MYPATH

ENV JAVA_HOME /user/local/jdk1.8.0_11
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV CATALINA_HOME /user/local/apache-tomcat-9.0.22
ENV CATALINA_BASH /user/local/apache-tomcat-9.0.22
ENV PATH $PATH:$JAVA_HOME/bin:$CATALINA_HOME

EXPOSE 8080

CMD user/local/apache-tomcat-9.0.22/bin/startup.sh && tail -F /url/local/apache-tomcat-9.0.22/bin/logs/catalina.out
  1. docker build Dockerfile -t mytomcat:0.1 . #This point is the soul. It can’t be done without it

Recommended Today

019 peek is realized through the double linked list of rust

introduce Video address:www.bilibili.com/video/av78062009/Relevant source code:github.com/anonymousGiga/Rust-link… Details In this section, we implement peek of double linked list. Implement peek According to our previous experience in implementing single linked list, we can easily think of how to implement our peek function, as follows: pub fn peek_front(&self) -> Option<&T> { self.head.as_ref().map(|node| { &node.borrow().elem }) } Compile and report […]