Docker's basic command __docker

Source: Internet
Author: User
Tags db2 docker ps docker run

A long time ago want to do tomorrow's Docker what exactly is what, by this summer hot temperature, swim a

Register an account on the hub https://hub.docker.com/

Download a docker install to local https://www.docker.com/

Installation under Windows I'm sure everyone will be proficient.


Run the Docker Quickstart Terminal on the desktop to complete the final configuration, you may encounter network problems, Google


Commonly used commands and artificial methods:

Search a mirrored docker search mirror name

The Docker images command can list all installed mirrors.

Download a mirrored Docker pull Python

The Docker Run command enables you to start a mirror and run a command. Docker run python echo "Hello World" the first Hello World

To install a new program in the Docker container: Docker run learn/tutorial apt-get install-y Ping

Saving modifications to a container through the Docker commit command to view the Docker ps-l ID

CONTAINER ID

89156f3cb6ce

Docker commit 89156 Learn/ping

After submitting a change to a mirror, you can run the newly installed command inside it Docker run learn/ping Ping www.baidu.com

Use the Docker PS command to view all the running container lists and use the Docker inspect command to view more detailed information about a container.

We can also publish our own compiled image to the index page, on the one hand can be reused, on the other hand can also be shared with others.

Docker Push Learn/ping


-----------------------------------------------------

1.docker basic Commands
Docker images
Docker Ps-a
Docker Pull Images_name
Docker-i-T run image
Docker Run-t-I. Centos:centos6/bin/bash
Yum install-y MySQL Mysql-serve
Docker commit-m= "Install MySQL"-a= "Wumi" 139cd4b2d549 Centos6:wumi # Build A-image from container
Docker Rimi Image

Docker build-t Wumi/centos-ssh-root. #build a images from the basic image by Dockerfile


Python with DB2 and Excel. Jason

1.install DB2 module:
C:\python27\scripts>easy_install.exe ibm_db

2.The examples to connect to DB2:

Example 1:connect to a local or cataloged database

Import ibm_db
conn = Ibm_db.connect ("database", "username", "password")

Example 2:connect to a uncataloged database

Import ibm_db
Ibm_db.connect ("Database=name; Hostname=host; port=60000; Protocol=tcpip; Uid=username;
Pwd=password; "," "," "")

This is a catalog example:
DB2 "Catalog TCPIP node Db2dunk remote thunderbird.rochny.ibm.com server 60000"
DB2 "Catalog db ODS as Odsdunk at node Db2dunk with ' ODS DEV '"
DB2 Terminate
and Uncatalog:
DB2 Uncatalog Odsrum
DB2 uncatalog Node Db2rum

3.the example to write the data to Excel


4.the example to write the data to Jason











Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.