This will show you the process of using Dockerfile to create a Docker image with Apache services.Preparatory work:First, create a Apache_centos working directory in which[Email protected] ~]# mkdir apache_centos cd Apache_centos[email protected] apache_centos]# Touch Dockerfile run.sh[Email protected] apache_centos]# mkdir sample[email protected] apache_centos]# cat DockerfileFrom Docker.io/centos:latest#设
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
Tags: ubuntu djang class Run comment variable repo modify pipA docker pull ubuntu, first download down a mirror,Or start a mirror locallyDocker Run-i-T Ubuntu/bin/bashTwoEnter a certain update operation# Shell on Container$ apt-get Update$ apt-get-y Install Python-pip$ pip Install DjangoThe above action is to update the source and then install Pip and DjangoThreeUpdate imageDocker Commit- m="description about Images" --author="Author" {container_id} {
mysqld_charset.cnf/etc/mysql/conf.d/mysqld_charset.cnf# Add a MYSQL scriptADD import_sql.sh/import_sql.shADD run.sh/run.shRUN chmod 755/*.sh# Set environment variables, user names and secretsENV Mysql_user AdminENV Mysql_pass **random**# Setting environment variables in master-slave copy modeENV Replication_master **false**ENV Replication_slave **false**ENV replication_user ReplicaENV replication_pass Replica# Set the volume that can be mounted, which can be used to back up the database and con
Background: The Spring Boot integrated Servlet is released as a ready-to-run war package for later packaging as a Docker image.
Original Address Https://github.com/weibaohui/springboot-servlet-jsp-war-demo
#1, Build.gradle configuration note, added the war plug-in, the dependency of Jstl, Tomcat-embed-jasper, so as to run the JSP page.buildscript { ext { springBootVersion = ‘1.5.3.RELEASE
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.
Reason:/etc/dpkg/dpkg.cfg.d/excludes file, the install Help document is rejected. At this point, even if the APT installation help document appears to be successful, it is not actually installed locally. The contents of the excludes file are as follows:# Drop all man pages path-exclude=/usr/share/man/*# Drop all documentation ... path-exclude=/usr/share/doc/*# ... except copyright files ...path-include=/usr/share/doc/*/copyright# ... and Debian changelogspath-include=/usr/share/doc/*/changelog.D
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 to reduce the number of mirrored layers, whic
First, Docker pulls the Tomcat image, as shown in figure:
Second, install the Tomcat container, as shown:
Note:--link Connect to MySQL (otherwise the DB cannot be accessed.) Each container is independent)
Tomcat_mysql is an alias. DB configured as: tomcat_mysql:3306
Third, if the 80 port is occupied, then stop Tomcat and remove the Tomcat container, as shown in figure:
Four, replace the port of
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.