1. Select the base imageDocker Pull Tomcat:7.0-jre82. Generate an HTTPS certificateKeytool-genkey-alias Tomcat-keyalg Rsa-keystore Tomcat.keystore[Email protected]:~/ssl# lsTomcat.keystore3. Launch the Tomcat container and import the certificate[Email protected]:/usr/local/tomcat# ls/tmp/Tomcat.keystore[Email protected
/run.sh
# vi/root/run.sh
Then, edit the script contents as follows:
#!/bin/bash
export java_home=/opt/jdk/
export path= $JAVA _home/bin: $PATH
sh/opt/tomcat/bin/ Catalina.sh Run
Finally, add execute permissions for the run script:
# chmod u+x/root/run.sh
2.6 Exit Container
When all the above steps are complete, you can exit the container using the Exit command.
You can then view the running container by using the follo
Software Environment: JDK, Tomcat, Docker, CentOS, virtual machineFirst, you have to prepare a CentOS operating system, and the virtual machine is OK. In summary, the CentOS operating system can be accessed via the Linux Client tool.It should be explained that Ubuntu or other Linux operating systems can also play Docker, but this article chose to use CentOS as an
command is somewhat complicated, if interested, here is an article I previously wrote based on Lxc, (from scratch, to build a simple version of the Java PAAs Cloud platform), you can review it in advance.
The principle of implementation, the relevant theory, the use of scenes, etc., will be written in the back of this series, here first a taste, completely manual, based on Docker to build a tomcat operatin
Docker Deployment Apache-tomcatLab Environment:Centos 7Phpstudy (provide wget download the following two packages to CentOS)Required Packages:Jdk-8u11-linux-x64.tar.gzApache-tomcat-7.0.84.tar.gzProvide download link: Https://pan.baidu.com/s/1miZh9wO Password: 8d5f
Docker is an open-source application container engine that allows developers to package their
One of the Docker learning notes to build a Java Tomcat operating environment prefaceDocker is designed to provide an automated deployment solution for an application that quickly creates a container (lightweight virtual machine) on a Linux system and deploys and runs the application, making it easy to automate the installation, deployment, and upgrade of applications with configuration files. Because of th
1, a simple picture of the layout of the Docker, it is virtual, Docker is divided into a VPN, mirror, container three modulesGenerally from the server pull image, image run a container, we put the container as a virtual service, which can be run independently of the process has a separate intranet IP,Usually the Tomcat, the project is hung in the container to run
client login
Apt-get UpdateApt-get Install Openssh-serverWhich sshd/usr/sbin/sshdMkdir/var/run/sshdpasswd #输入用户密码, I set it to 123456 for easy SSH client LoginExit #退出
Gets the instance container ID that was just manipulated
#docker ps-lCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES51774A81BEB3 Learn/tutorial:latest/bin/bash 3 minutes ago Exit 0 Thirsty_pasteur
You can see that the container ID for the current operation is: 51774A81BEB3. N
Let's start with a simple Docker concept.
Docker is an open source application container engine that allows developers to package their apps and dependencies into a portable container, and then publish it to any popular Linux machine or virtualization. Containers are completely using the sandbox mechanism, and there will be no interface between each other.
1, first say how to deploy
1. Deploy the tomcat image # to download the official Tomcat image.sudo docker pull tomcat:7-jre7#启动docker容器, 2 instances, mapping different port numbers, #~/work/sample-webapps/[v1.0|v2.0]/the Javaweb.war package below, mapped to the Do
This article describes how to configure Simple Server Load balancer on Docker. The host machine is Ubuntu14.04.2LTS, two CentOS containers, Nginx for the host machine, and tomcat 7 for the two containers. The architecture is as follows: the principle of this solution is to map the host machine port and the docker container port (that is, a port accessing the host
Entry level, simple record under Docker run Tomcat, deploy your own development application, please explain the error. First, Docker installation
According to the official website of the instructions download docker.dmg mirror files, and usually install the same steps installed software can be completed.Website address:https://docs.docker.com/
If tomcat is deployed in docker and java applications are deployed
1. Deploy tomcat in docker
Step 1: log on to the root directory of the system and create the tomcat7 folder. Run the command mkdir tomcat7 and switch to the directory cd tomcat7;
Step 2: Create a Dockerfile. The command is touch Dockerfile;
Step 3: Comp
Overall environment configurationThe configuration of the overall environment, if one Dockerfile to write, then it is quite troublesome, fortunately, Docker has a tool called docker-compose, we can use it to complete the configuration of the overall environment:First, let's look at the contents of the DOCKER-COMPOSE.YML configuration file:Version: "3"ServicesMysq
the container
Containers are run on the basis of mirroring, and once the container is started, we can log in to the container and install the software or application we need.
Use the following command to start the container:
# docker Run-i-t-v/root/software/:/mnt/software/83ee/bin/bash
The command consists of the following three sections:
Docker run
Among them, the relevant parameters include:
-I: Indic
, repeatable environment. LXC command is somewhat complex, if interested, here is an article I wrote previously based on LXC, (The implementation principles, related theories, application scenarios, etc., will be written later in this series, here first a scratch, completely manual, based on Docker to build a tomcat operating environment. First out a smarty pants demo, you can see the effect, may let us go
If tomcat is deployed in docker and java applications are deployed
1. Deploy tomcat in docker
Step 1: log on to the root directory of the system and create the tomcat7 folder. Run the command mkdir tomcat7 and switch to the directory cd tomcat7;
Step 2: Create a Dockerfile. The command is touch Dockerfile;
Step 3: Comp
previously based on LXC, (The implementation principles, related theories, application scenarios, etc., will be written later in this series, here first a scratch, completely manual, based on Docker to build a tomcat operating environment. First out a smarty pants demo, you can see the effect, may let us go farther.EnvironmentIn all environments, VMware workstation runs UBUNTU-13.10-SERVER-AMD64 on a 64-bi
Docker automatically deploy Tomcat
1. Download Mirror
# Docker Pull Centos:latest #获取最新的centos镜像
2. Start the container
#docker run-i-t-v/home/user/software/:/home/software/imageid/bin/bash
Actually contains the following three parts:
Docker run
Among them, the relat
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.