centos7 cat的docker映象demo
阿新 • • 發佈:2018-11-08
1、vim Dockerfile
FROM cat MAINTAINER xxx<<A href="mailto:xxx">xxx> LABEL version="1.0" RUN mkdir -p /opt/jdk/ RUN mkdir -p /opt/tomcat/ RUN mkdir -p /data/appdatas/cat RUN touch /data/appdatas/logging.properties WORKDIR / ADD /data/appdatas/cat /data/appdatas/cat/ ADD /opt/docker/tomcat /opt/tomcat/ ADD /opt/docker/jdk8 /opt/jdk/ ENV JAVA_HOME=/opt/jdk ENV JAVA_BIN=/opt/jdk/bin ENV PATH=$PATH:$JAVA_HOME/bin ENV CLASSPATH=.:$JAVA_HOME/lib/ib/dt.jar:$JA:$JAVA_HOME/lib/ib/tools.jar EXPOSE 8080 ENTRYPOINT /opt/tomcat/bin/startup.sh && tail -F /opt/tomcat/logs/catalina.out
2、生成docker映象
docker build -t test/cat .
3、執行
docker run -p 2280:2280 -p 8080:8080 test/cat /bin/bash
常見的docker命令
docker ps -a
docker stop name
docker rm name
docker images
docker rmi <image id>