is the CMD command, indicating the operation command when running the container.Dockerfile official documentation:Https://docs.docker.com/engine/reference/builder/Dockerfile best practices:Https://docs.docker.com/engine/userguide/eng-Image/dockerfile_best-practices/Docker official image dockerfile:Https://github.com/docker-library/docs2. From command
The from command is used to specify the basic image. The
environment variable
source/etc/profile
# Start Tomcat
bash/data/tomcat/ Bin/catalina.sh Run
Add executable permission: chmod u+x/data/start.sh
(5) Build mirror
Two ways to build a mirror using Docker:
Use Docker commit command, more intuitive;
Using the Docker b
1 Background 1.1 Docker introductionDocker is a container engine project based on lightweight virtualization technology from Docker, the entire project is based on the go language and complies with the Apache 2.0 protocol. Today, Docker can quickly automate deployment of applications within the container, and can provide container resource isolation and security
Docker to build a Java Web environment this weekend, you'll experience some pretty hot Docker technology and simply record your own learning notes. What does >docker do?Docker is an advanced container engine based on the Linux container (Lxc-linux container), developed based on the Go language,The source code is hosted
can use Docker to run it,Start the container with the following command arguments,Docker run -I: Indicates that the container is running in "interactive mode"-T: Indicates that the container will enter its command line when it is started-V: Indicates which directory you want to mount locally to the container.Format:-v My related programs are in the/data/software/directory of the current machine and want to
Docker Quick Start-common docker commands 1. Introduction to docker commands 1. Introduction to docker commands
You can run the sudo docker or sudo docker HELP command to view the docker
start container docker run-ti Ubuntu/bin/bash
Docker run = First Docker Create and then Docker start
-T means to have Docker assign a pseudo terminal and bind to the container's standard input
When the-T is used, the command operation can be performed, but only one time
script executes.vi/data/start.shAdd the following content:?
12345
#!/bin/bash# Export environment variablesource/etc/profile# Start tomcatbash/data/tomcat/bin/catalina.sh run
Add executable permissions: chmod u+x/data/start.sh(5) Build imageThere are two ways to build a mirror using Docker:Use the Docker commit command to be more intuitive;Using the
1 PrefaceSince its inception, Docker has led the technology boom in lightweight virtualization containers. In this trend, Google, IBM, Redhat and other industry leaders have joined the Docker camp. While Docker is still primarily based on the Linux platform, Microsoft has repeatedly announced support for Docker, from p
First, preface
Prior to our company Deployment Services, which is what we all know (install JDK, tomcat-> compiled file or fight War package upload, start Tomcat), this kind of deployment has lasted for a long time, resulting in a lot of problems:
1, the heavy release task. MicroServices a lot, it is necessary to restart each service, and if the cluster, then the service to start more.
2, environmental mi
SIZEhello-world latest c54a2cc56cbb 9 weeks ago 1.848 kBdocker imagescommand to display all of the Docker images for this machine.(iii) Online search for images:If you don't know what images are available, it might be a good idea to look it up online:Direct use docker search + [你想查找的镜像关键字] , such as:$ docker Search
container will enter its command line when it is started
-v: indicates which directory needs to be mounted to the container, format:-v
Assuming that all our installers are placed in the/root/software/directory of the host, it is now necessary to mount it to the Container's/mnt/software/directory.It is necessary to note that you do not have to use "mirror ID" or "warehouse name: tag name", for example: docker.cn/docker/centos:centos6.The ini
af0819ed1fac:already exists
From the Aliyun private mirrored warehouse pull CentOS mirrored to the local, because the Aliyun image acceleration is configured, so the download is very fast, 30 seconds to fix.
# Docker Images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos latest 97cad5e16cb6 days ago 196.5 MB
# Docker run-d-it centos/bin/bash run CentOS container
#
the container is running in "interactive mode"
-t: Indicates that the container will enter its command line when it is started
-v: Indicates which directory needs to be mounted to the container, format:-v
Assuming that all of our installers are placed in the directory of the host /root/software/ , we now need to mount them in the container's /mnt/software/ directory.It is necessary to note that you do not have to use "mirror ID" or "warehouse Name: Tag name", for example: DOCKER.C
Docker Deployment Java Web System1. Create a path in the root directory test/app mkdir Test CD test mkdir app cd app2. Copy the apache-tomcat-7.0.29.tar.gz and jdk-7u25-linux-x64.tar.gz to the app directory3. Extract two tar.gz filesTAR-ZXVF apache-tomcat-7.0.29.tar.gz TAR-ZXVF jdk-7u25-linux-x64.tar.gz4. Rename the extracted filesMV apache-
Docker-2 learn more about docker, docker-2dockerDockerBasic concepts of images, containers, and warehousesImages
A Docker image is a read-only template.For example, an image can contain a complete CentOS operating system environment where only httpd or other applications are installed.
Images can be used to create
This is a creation in
Article, where the information may have evolved or changed.
The text of this text connection is: http://blog.csdn.net/freewebsys/article/details/51154388 not allowed to reprint without the Bo master.Bo main address is: Http://blog.csdn.net/freewebsys
1,docker is very convenient.
The advantage of using Docker is that you can save server costs, deploy quickly, and scale quickly.The b
As the testing server in the company is constantly changing, it is troublesome to configure the environment on the new server after each change. Then I suddenly thought about what I saw on the internet that Docker could quickly deploy portable containers, so I tried to use Docker to build a test environment for Tomcat and Oracle. Therefore, this article mainly fo
Assuming that all of our installers are placed in the/root/software/directory of the host, we now need to mount them in the container's/mnt/software/directory.
Note that you do not have to use the mirror ID or the warehouse name: label name, for example: DOCKER.CN/DOCKER/CENTOS:CENTOS6.
The initial command indicates that once the container is started, the command that needs to be run, "/bin/bash" is used to indicate nothing, just go to the co
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.