利用docker 部署項目
阿新 • • 發佈:2019-03-23
variable x64 start fir 項目 .gz ble set define #set environment variable
ENV JAVA_HOME /root/jdk1.6.0_45
ENV PATH $JAVA_HOME/bin:$PATH
#define entry point which will be run first when the container starts up
ENTRYPOINT /root/apache-tomcat-7.0.73/bin/startup.sh && tail -F /root/apache-tomcat-7.0.73/logs/catalina.out
5、docker build -t keven/centos:tomcat-centos --rm=true .
6、docker images keven/centos
7、docker run -d -p 8881:8881 3216(id)
docker_tomcat_jdk 7.0 1.6 app admin && api
1、yum install docker
2、service docker start
3、創建文件夾放入jdkforlinux.tar.gz && tomcatforlinux.tar.gz
4、DockerFile
#pull down centos image
FROM centos
#copy jdk and tomcat into image
ADD ./apache-tomcat-7.0.73.tar.gz /root
ADD ./jdk-6u45-linux-x64.tar.gz /root
ENV JAVA_HOME /root/jdk1.6.0_45
ENV PATH $JAVA_HOME/bin:$PATH
#define entry point which will be run first when the container starts up
ENTRYPOINT /root/apache-tomcat-7.0.73/bin/startup.sh && tail -F /root/apache-tomcat-7.0.73/logs/catalina.out
5、docker build -t keven/centos:tomcat-centos --rm=true .
7、docker run -d -p 8881:8881 3216(id)
利用docker 部署項目