ago258.6Mbmysql5.7E95cbb9f48ea5Days ago258.6MBStart the MySQL container[Email protected] ~/base $ docker run--name db001-p3306:3306 - eMysql_root_password=admin- DMysql:5.7#上面这条语句启动了一个名字叫 db001 container, his root password is admin, mapping the host host port 3306 to the container port 3306, these are manually specified. [Email protected] ~/base $ docker pscontainer ID
If you need to replace or add a file to the old Tomcatimage to form a new image, you need to do something in Dockerfile
From Old_tomcat
#这里可以使用docker官方的镜像, the following descriptions are examples of
maintainer ****************** on this basis
#如果需要替换原有的配置文件或者脚本
ADD web.xml/usr/local/tomcat/webapps/manager/web-inf/
Add tomcat-users.xml/usr/local/tomcat/conf/
Add server.xml/usr/local/tomcat/conf/
add
Reprint: http://www.cnblogs.com/cfrost/p/6241892.htmlThe first is pull image, and here I take5.6.35:
1
$sudodocker pull mysql:5.6.35
After pulling down the big can follow the official instructions no brain start, but external inaccessible, so bound port:
1
$sudodocker run --name mysql -p 12345:3306 -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.6.35
Try to connect with the client, success
/index.jsp").forward(request, response); }}# #3.2, Controller mode using JSP Note: With application.properties configuration, you can use a simplified JSP path ###①application.properties configurationspring.mvc.view.prefix=/WEB-INF/jsp/spring.mvc.view.suffix=.jsp###②controller Writing@Controller public class HelloController { @RequestMapping("/index1") public ModelAndView index(ModelAndView view) { view.setViewName("index"); return view; } }#4,
exchanges and discussions.Company Background Introduction:Shanghai Yun Axis Information Technology Co., Ltd. (hereinafter referred to as Shanghai Yun Axis) was established in 2015. The company initiated and maintained the next generation of open source cloud computing engine Zstack (http://zstack.org), the company's team members are from Silicon Valley and domestic foreign core research and development personnel, in the cloud-related core areas of more than 10 years of technology accumulation.
If we use Dockerfile to build Docker mirrors, it would be very scary to accidentally cause the mirror to be larger than 1G. Are generally good hundreds of trillion. Larger mirrors tend to cause porting and migration is slow. Dockerfile, like code, needs to be optimized continuously. Using the following 4 optimization schemes, you can significantly reduce the size of the mirror.
The most important factor is
Run command has an external dependency: Once the Run command has an external dependency, such asRUN apt-get update, then over time, based on the same underlying image, one year of Apt-get update and one year after the Apt-get update, the resulting mirror should theoretically be different due to the update of the software source software. If you continue to use the cache mechanism, there will be situations that do not meet the user's needs. The first
specially finishing a tutorial, the benefit of the vast number of mcers.
2 How to Build
As we all know, MC is written in Java, both client and server are directly a jar package, so the prerequisite is to have a JRE. My MC suit is completely manually set up, first with you simple to talk about the steps of manual construction.
1, create a Linux container, Ubuntu, Debian, CentOS see what you like, I use Debian
2. Install JRE or JDK
3, the installa
Tags: server script distinguished Login definition Introduction transfer file SCP calDocker install and pull MySQL image is not introduced here, many introductions, recommended to go to the official Docker website to view. This article mainly introduces some configuration of MySQL container after running. Before you look down, make sure Ls You can see the MySQL container. [1] If the database schema is not o
Use Dockerfile to build an imageCreate a directory and initialize Dockerfile .~ Mkdir static_web? ~ Cd static_web? Static_web touch Dockerfile? Static_web vim Dockerfile we create a directory named static_web to save the Dockerfile. This directory is our build environment, and Docker calls this environment the build co
/Server.xml Mysqld_safe/usr/local/mycat/bin/mycat Start httpd /usr/local/tomcat/bin/catalina.SHRun In this startup script, the user name and password of the Mycat are set by using the parameters, and the user name and password are specified in the following variables in the Dockerfile: Env Mycat_user mycat
env mycat_pass Mycat Note: When creating a container based on this image, you can also specify the values of the above two parameters through the-
AWS provides a wide variety of mirrors for users, but in most cases the AMI provided in the community do not fully meet our needs, such as the more disgusting some mirrored root partitions are only 10g, so we generally use the community's public image to create a EC2, And then configure her, and then hit a mirror for the project, Packer can make us more automated to generate AMI, we can write the original image
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.