Docker Quick Start-docker image creation I. dockerfile Script 1. Introduction to dockerfile script
Dockerfile is a text file that contains an instruction. Each instruction creates a layer. Therefore, the content of each instruction describes how to build the layer.Dockerfile example:
# Dockerfile format # This dockerfile uses the Ubuntu
. Eventually we see the same filesystem as Linux. has indicated that the image is actually stored in the diff directory.In summary, the Docker image is ultimately stored in/var/lib/docker/aufs/diff, and there is a record of what is being done in graph. When the container starts, the readable layer
of ways, such as the SCP, not detailed here.
4. Load the image tar file with the Docker load command on the machine that needs to use image (e.g. Machine B)
sudo docker load-i File_path
Note: In addition, you can also use Docker's export and import command to achieve s
Dockerfile content, because all operations must be performed based on Dockerfile. Then, the command in Dockfile is executed one by one. Each step creates a new container, executes commands in the container, and submits modifications (just like docker commit ). After all the commands are executed, the final image id is returned. All containers generated by the intermediate steps are deleted and cleared.
* N
GitLab construction and maintenance (based on Docker image sameersbn/docker-gitlab)1. Read the basics of this Article
Familiar with git
Familiar with docker
2. GitLab introduction 2.1. Overview
GitLab is an open-source project used for warehouse management systems. A web service built on Git as a code management t
1. Export container If you want to export a local container, you can use the Docker Export command to
export the container snapshot to a local file
.
$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7691a814370eUbuntu:14.04 "/bin/bash" $hours agoExited (0) +hours ag
/stderr)
Docker events # Get Real-time events of the docker Server
Docker port # display container port ing
Docker top # display container Process Information
Docker diff # display the changes before and after the container File System
Export container
foundation for storage, reuse, and transmission of containers, and the container mirrors "sit on the wheel" and spread to every corner of the world, helping the rapid development of container technology.
Unlike earlier kernel container technologies, such as Solaris Container and LXC, Docker also provides developers with a good set of tools to experience, including dockerfile for mirroring builds and a domain-specific language for writing Dockerfil. T
you delete an image in this way, because there will be some issues in the future (the official did not say anything about the impact ), the official step forward is to first Delete the container dependent on the image and then delete the image.
Docker ps-a # display all containers
different ways:
Created based on a container that already has mirrors
$ docker commit-m "Add new Image"-a "" 000 (container ID) test (new image name)
Import based on local template
$ Cat Ubuntu-14.04-x86_64-minimal.tar.gz | Docker
Build a Docker registry private image to resolve the Docker private warehouse push error
applies To: Docker 1.8 Environment: Centos7
Each version of the Docker modification configuration content is different, please be optimistic about the installation of the
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
Basic concepts:
Container
Container. Each container can be viewed as a standalone host. The creation of container usually has an image as its template. Analogy to a virtual machine can be understood as image is the mirror of the virtual machine, and container is a running virtual machine. A virtual machine image can create multiple running virtual h
Docker there's a dockerfile, why should we use him?To put it simply: we used to Docker run to create a Docker container that sometimes comes with a lot of parameters.Like what:
The code is as follows
Copy Code
Docker run-d-P 22-p 8080:8080 Ruifengyun/ubunt-redis "Redis-server redis.conf /us
import mirrors from the local file system
Tar format mirrored package download address: http://openvz.org/Download/templates/precreated
For example, first download a ubuntu-14.04 mirror, and then use the following command to import:
# cat ubuntu-14.04-x86_64-minimal.tar.gz |docker import-ubuntu:14.04
Then view the ne
One for building and pushingDockerof the MirrorMavenPlug - ins.Use the Maven plugin to build the Docker image, Docker mirror push it to the DockerHub top, or the private warehouse, the previous article is handwritten Dockerfile , this article with the open source plug-in docker-maven-plugin operationThe following actio
1 First you have to prepare a hub account, go to https://hub.docker.com register it!2 Create a new warehouse at the hub, which is similar to the one on GitHub. Creation---> Create repository (Creating a knowledge Base) and then just a name, I'll call it Ubuntu, so the path is Wherein/ubuntu.3 Run Docker PS View container, here is to get to container ID4 Commit a container command: Docker commit CONTAINER ID
1. Generating a Docker image for an ASP. NET Core ApplicationDownload this case project: Https://github.com/dotnet/dotnet-docker/tree/master/samples/aspnetappWhen the download is complete, generate a mirror named Aspnetapp image for this project.Docker build-t Aspnetapp.In order to make a difference I created a a.html
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.