Operating System: VM centos6.5
Container: docker
Prerequisites: you can create an SSH-enabled docker image.
Method 1: manually create
1. generate a new key and public key on the host machine
### Ssh-keygen [-q] [-B bits]-T type [-N new_passphrase] [-C comment] [-foutput_keyfile] # ssh-keygen usage reference official ssh-keygen-Q-n ""-t dsa-F/root /. SSH/id_dsa
return Enter HTTP//host's ip/test.php carriage return 3) database Operation test Open Navicat for MySQL Create a new connection Host name is the IP of the host, why this is the IP of the host, because the database container is established on the host, and the host and the container when the container is running w
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
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 abo
Tags: MySQL's centos Docker mirrorThe following is installed with the official RPM source package MySQL too slow does not advocate the use of Yum this wayThe "tutum" of the #本文参考了 DockerfileFrom Docker.io/centos:latestMaintainer Waitfish#设置环境变量, all operations are non-interactiveENV Debian_frontend noninteractiveRUN echo "Asia/shanghai" >/etc/timezone#注意这里要更改系统的时区设置, because the time zone
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.
When you start using Docker, people often ask: "How do I get into the container?" "And others will say" run an SSH server in your container. " However, from this blog post you will learn that you do not need to run the sshd daemon to enter your container. Unless, of course, your container is an SSH server.
Running an SSH server is taken for granted because it pr
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
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
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
Bit rate control is actually a coding optimization algorithm, which is used to control the video stream size.
So what is the purpose of its control? We can imagine that the same video encoding format, the code flow is large, it contains more information, then the correspondi
I use the IMAGESC function to display the image, because the parameter can be added Colorbar function, but the display of the image and the original image scale is not the same, do not know what the reason. Moreover, the size of the digital font on the Colorbar can be change
When phpmailer sends an image, it prompts that the image is successfully sent, but the image in the email is not shown as the question. The body format is HTML. I made an editing page and the
systemctl start docker.service#配置开机启动systemctlenabledocker.serviceConfigure Docker accelerationThe fastest way to configure Docker acceleration is to directly modify/etc/docker/daemon.json下的配置信息/etc/docker/daemon.json{"registry-mirrors": ["https://d8b3zdiw.mirror.aliyuncs.co
I. Download Registry#yum install-y python-devel libevent-devel python-pip gcc xz-devel#python-pip install Docker-registry Two. Perform the following actions on all Docker hosts #vi/etc/sysconfig/docker set other_args= '--insecure-registry 192.168.24.205:5000 ' #service Docker restart three. Open the firewall and start
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.