Docker consists of three concepts:(1) The remote Repository is the aggregate of all the mirrors in the Remote Mirror Library (no entry operation).(2) The local image is the image pulled from the remote repository.(3) A local image is called a container (layered and operable).Docker
1, actual combat purposes
build an enterprise-private mirrored warehouse that meets push and pull mirroring from the development environment . When we use k8s to orchestrate and dispatch containers, the basic unit of the operation is mirroring, so we need to pull the mirror from the repository to the current working node. The use of a public Docker hub is perfectly suited to our needs and is very convenient, but the uploaded
Package a Docker image so that your friends can load and open a container and output hello and world to the specified file every second,
I. Two script codes
Dockerfile
1 FROM bash2 COPY . /usr/herui/3 WORKDIR /usr/herui/4 CMD [ "sh", "hello_world.sh" ]
Hello_world.sh
1 #!/bin/bash2 while true3 do4 echo 'hello world!' >> /usr/herui/hello_world.log5 sleep 16 done
Ii. package it into an
When you create a mirror through dockerfile, it is generally based on the official image provided by the Docker Hub. The following describes how to create a personal private base image on a ubuntu16 system .1, install bootstrap tool Debootstrap$ sudo apt-get insall debootstrap-y2. Download ubuntuxenial (16.04) binaries using debootstrap3. Create a base
Install the Redis image with Docker in Ubuntu and share it with the Redis container
1. Install Ubuntu2. Use Putty to log on to UbuntuWelcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.small-40-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Wed Dec 31 06:41:16 UTC 2014
System load: 0.01 Processes: 228Usage of/: 6.0% of 28.80 GB Users logged in: 0Memory usage: 11% IP address for et
1. Use Febootstrap to make base image
make a mirrored directoryIn Docker Getting Started (http://blog.csdn.net/woshiluahuo/article/details/51838451), we talked about base image, and now we're going to use the Febootstrap tool to make base Image
febootstrap-i bash-i wget-i yum-i iputils-i iproute-i man-i vim-i openssh-s
{public dbset public class Tbuser { [databasegenerated (Databasegeneratedoption.none)] public int ID {get; set;} public string Nickname {get; set;} public string Email {get; set;} } public class Tbuserdatahandle:datacontext {public static int adduser (Tbuser user) {try {using (var context = new DataContext ()) {context. Database.ensurecreated (); Context. ADD (user); Context. SaveChanges ();
Create a docker image and initialize the jdk8 and tomcat environments.1. Create a Dockerfile:
Create a Dockerfile and download jdk and tomcat in the same directory as Dockerfile.
Dockerfile content:
1 FROM Ubuntu: 14.10 2 MAINTAINER linx 3 4 # ADD java and tomcat to the container 5 ADD jdk-8u31-linux-x64.tar.gz/usr/local/6 ADD apache-tomcat-8.0.20.tar.gz/usr/local/7 8 # configure java and tomcat Environmen
First, the environmentUbuntu 14.04Docker version 1.9Second, the preparatory work
Download Ubuntu image----Docker pull Ubuntu
New Apache directory mkdir/apache into Apache Cd/apache
New File Dockerfile Touch Dockerfile
Create a new index.html touch index.html in the Apache directory
VI index.html Input:
VI Dockerfile Input:From UbuntuMaintainer ZHONGRUN APT-GET-YQQ UpdateRUN apt-get-yqq Install
#docker build Image (Dockerfile)
CentOS 7.4.1078 Image Maker
Nginx image creation (based on front centos7 image)
nginx+php Image Production
For more walkthrough, see the Readme file in GitMy git site https://
1. Install Ubuntu2. use Putty to log on to UbuntuWelcometoUbuntu14.04.1LTS (GNU/linux3.20.- 40-genericx86_64) * Documentation: https://help.ubuntu.com/SysteminformationasofWedDec3106:41
1. Install Ubuntu2. Use Putty to log on to UbuntuWelcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.small-40-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Wed Dec 31 06:41:16 UTC 2014
System load: 0.01 Processes: 228Usage of/: 6.0% of 28.80 GB Users logged in: 0Memory usage: 11% IP ad
Docker container run, generally cannot ssh, this container management brings trouble, below will explain how to create a docker image that supports SSH
Download the Ubuntu image from the dock hub firstCommand: Docker pull Ubuntu
Create a new Ssh_ubuntu directoryMkdir/s
Installation environment, CentOS Linux version 3.10.0-514.el7.x86_641. Find the latest MySQL imageDocker search MySQL2, download the latest mysql-server imageDocker pull Mysql/mysql-server:latest 3, after the download is complete, you can view the downloaded image Docker images 4, build container, the-e command to set the default password,--name can customize the name of the
1 environment2 steps3 FAQs4 referencesEnvironmentUbuntu-16.04-desktop-amd64.isoStepsSpecific can refer to blog post, in my environment implementation success, here Jiehuaxianfo: http://www.cnblogs.com/lienhua34/p/4922130.htmlFAQsThe only solution to the push failure in the above blog post is not valid in my environment.The error prompts are as follows:[Email protected]:/etc/default# sudo docker push 192.168.80.130:5000/hello-worldThe push refers to a
Build a docker image to build Tomcat9.0 mirroring (RPM One-click Install Java Environment)Tomcat is a free, open source, lightweight Web server that is commonly used in small and medium-sized enterprises and where concurrent access is low, and is the first choice for developing and debugging JSP programs. The following is the way to create a dockerfile image with
docker:/root# Docker PS CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f3cb864be528 192.168.32.150:5000/zjzc_centos6.5_templat E "Bash" about a minute ago up about a minute zjzc_test99 d25712059 702 192.168.32.150:5000/zjzc_centos6.5_m2 "bash" 7 minutes ago up 7 minutes Sick_wright 8302f2eb1c9e 192.168.32.150:50
Http://www.oschina.net/news/62897/docker-hub-contains-high-risk-vulnerabilities Here's a statistic,Docker . Official and individual release of the image due to a variety of reasons, such as the number of loopholes, how can we start from scratch to make a custom image? Yes, look for the official document Http://docs.doc
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.