Tags: ati mys Docker command Nat Col Test Ice requested DockerFirst, the installation of Docker: Check if your own amount is above 3.10, or Centos7 1. Uname-r 2. Install Docker command: Yum -y install docker-io 3. Start the Docker
installed$ sudo docker run Hello-world $ sudo docker images 4. How to turn on stop Dockersudo stop/start/restart Docker5. Upgrade Docker$ sudo apt-get install-y lxc-docker$ sudo docker version 6. Run Dockersudo
Docker from the Java perspective. But let's start with some background information. In order to better understand Docker, we consulted the fewbytes Avishai Ish-shalom, he has a wealth of Docker experience, but also devops days meeting organizers. We have enumerated these misunderstandings with him.
Main misunderstand
This article focuses on how to run an ASP. NET core application in a Docker container, and then publish the update after modifying the system. This article uses a custom Docker fileSystem Requirements :1. Docker is installed on the server or locallyFirst, create an ASP. NET Core 2.1 Web App (this section can be ignored if you can create a project skillfully)Note
Last article we successfully installed Docker under Windows and exported a simple Hello World program. In this article we will use Docker's existing cloud image Training/webapp to publish a simple Python web program that outputs Hello World in a browser.The test environment for this article is Docker under Windows7, and use cases are based on official document use cases.one: From running a simple Python Web
mirrors from the local.-F forcibly removes the image, even if it is being used;--no-prune does not remove the process image of the image, which is removed by default.Ten. Docker RMDocker rm [options ' o ';] Docker rm nginx-01 nginx-02 db-01 db-02sudo docker rm-l/webapp/redis-F forcibly removes the container, even if it is running;-L removes the network connectio
) with Debuggingcentos Linux 7 (CORE), with Linux 3.10.0-229.el7.x86_64centos Linux 7 (CORE) , with Linux 0-rescue-f7e36a944a3d4035a61da37d8d4e2313(5) Set startup kernelBased on the above check kernel start order, top-down, starting from 0. If setting 4.9 starts then the following command$grub 2-set-default 0Restart$reboot(6) Check kernel version$ uname-r4.9.0-1.el7.elrepo.x86_64Kernel upgrade complete!!!II: Upgrade the
Three core concepts of Docker: mirrors, containers, warehousesImage: Like a virtual machine image, as the saying goes is the installation file.Containers: Similar to a lightweight sandbox, where containers are created from images to run instances of the application,You can start, start, stop, delete, and these containers are isolated from each other and are not v
was equivalent to adding the sandbox to the network. The following figure can briefly describe the relationship between the three.
Then it's about volumes, the one that persists, and Docker makes a big change. The first and most obvious is that--volume is no longer just a flag for Docker run, but also appears in Docker as a separate subcommand. The bottom lay
smaller and lighter than other executable processes, such as virtual machines.
In contrast, a virtual machine (VM) runs a full "customer" operating system that accesses host resources through virtual hypervisor virtual machines. In general, virtual machines provide more environments than most applications require.
Prepare your Docker environment
Please see the official website for Docker installation.
Cent
possible.ProvisionMy goal is to build a CI server that can run Android. For money-saving purposes, I use the local vagrant to start an Ubuntu virtual machine instead of a real server. The general idea is:
Launch the Ubuntu virtual machine and install Docker on Ubuntu;
Install the official Jenkins Docker image via
requirements.txt/usr for the python you need to install the app by relying on RUN apk add--update py2-pip #
/src/app/
RUN pip install--no-cache-dir-r/usr/src/app/requirements.txt
# Copy application required files to mirror
copy app.py/usr /src/app/
COPY templates/index.html/usr/src/app/templates/
# Set the port number that needs to be exposed
expose 5000
# Set application to start Python application cmd via cmd
["Python", "/usr/src/app/app.py"]
T
Docker is becoming more and more popular, and if your team is ready to start using Docker, then a private repository is essential, first of all to help you speed up the pull image from the server, and, second, to help you store a private image. This article is about how to open a images backup from a public server to a local private server.Docker images often fil
apt-get update Apt-get install-y m ongodb-org mkdir-p/data/db VOLUME ["/data"] Workdir/data ; CMD ["Mongod"] Expose 27017 expose 28017
The website has a lot of examples, interested friends can go to Https://github.com/dockerfile view. Use cmd in dockerfile, entrypoint need to note: Cmd is a model that can be written as a shell, that is, we usually write statements like cmd redis-s erver redis.conf Service sshd restart
way$ sudo docker pull ubuntu:14.046. Print Hello in the mirror$ sudo docker run Ubuntu/bin/echo helloPrint out Hello instructions you have successfully installed Docker and started a container!7, familiar with the common command#查看docker环境信息$ sudo docker version# sudo
Source: http://blog.csdn.net/anxpp/article/details/52476339
Containers are another core concept of Docker.
In general, a running instance of a mirror is a container, and the container provides a writable file layer.
This article describes the same structure as the mirror, and introduces the container gradually. 1. Create a container
Docker containers are very lightweight, easy to create and delete. 1.1. New
manipulating a fast, lightweight virtual machine. "One package, run everywhere." ”
First, the start of the Docker container can be implemented at the second level, which is much faster than the traditional virtual machine approach.Second, Docker is highly utilized for system resources and can run thousands of Docker
Tip1
Get the ID of the most recently run container this is an operation that we will often use, according to the official example, you can do this (environment Ubuntu):
This is useful when scripting, such as when you want to get IDs in bulk in a script, and then proceed further. But this approach requires you to assign a value to the ID, which is inconvenient if you are directly knocking at the command. At this point, you can change the way:
The Docker
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.