Installation and use of Docker and go

Source: Internet
Author: User
Tags docker run

It feels like the current Docker is as unstoppable as the 2013 spark, so it's necessary to learn more about Docker. We use the operating system for CentOS Linux release 7.2.1511 (Core) (64-bit). This article mainly introduces the installation and use of Docker, the installation and use of Go.

I. Installation and use of Docker

1. Installation of Docker

Yum Install Docker

Description: The Docker package is already included in the default Centos-extras software source.

2. Start the Docker service

Systemctl  start Docker.servicesystemctl  enable Docker.service

Description: And set Docker to boot.
3. Download the official CentOS image to the local

Docker Pull CentOS

Description
4. Confirm that the CentOS image has been acquired

Docker Images CentOS

5. Run a Docker container

Docker Run--rm-ti Centos/bin/bash

Description:--rm tells Docker to delete the container as soon as the running process exits. This is useful when testing, and eliminates clutter. -ti tells Docker to assign a pseudo-terminal and enter interactive mode. This goes into the container and is useful for rapid prototyping or trying, but do not open these flags in the production container. To break the connection to the container, enter exit.

Cat /etc/redhat-release Exit

6. Displays the list of currently running containers

Ps

Description: The Docker core is an operating system-level virtualization approach that provides a deep understanding of Docker's technical details from four aspects of the virtualization approach: Isolation, scalability/scalability, portability, and security. I believe in the future of virtualization technology.


Two. Installation and use of Go

The go installation and use takes place on Windows 10, as follows:

1. Installation of Go

The software version you use is Go1.5.windows-amd64.msi. Configure the environment variable goroot and path after the installation is complete.

2. Programming for Go

Hello.go the contents of the file as follows:

" FMT " Func Main () {  fmt. Printf ("hello,go!\n")}

Execute command: Go run hello.go

Description: If you want to use IntelliJ idea for go development, you need to install the appropriate plugin go-lang-idea-plugin[5][6].

Reference documents:

[1] Docker Getting started in action: Http://yuedu.baidu.com/ebook/d817967416fc700abb68fca1?fr=aladdin&key=docker&f=read

[2] What are some questions about Docker?: https://www.zhihu.com/question/25394149

[3] Docker tutorial:http://dockone.io/topic/docker%20tutorial

[4] What Docker is doing on Infoq: http://www.infoq.com/cn/dockers/?utm_source=infoq&utm_medium=header_graybar&utm_ Campaign=topic_clk

[5] Installing the Go language plugin in IntelliJ IDEA14: http://www.cnblogs.com/speeding/p/4881281.html

[6] IntelliJ idea 14 installing Golang plug-in go-lang-idea-plugin:http://aigo.iteye.com/blog/2214136

[7] Golang Environment construction: http://www.cnblogs.com/draem0507/p/3327487.html

Installation and use of Docker and go

Related Article

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.