Docker Hub

Creative Commons License Copyright: Attribution, allow others to create paper-based, and must distribute paper (based on the original license agreement with the same license Creative Commons )

Copyright, without permission, is prohibited reprint


chapter


Docker Hub is a community sharing Docker Docker mirror site / repository.

There are many Docker image above, for example: nginx official mirror, you can download these images from Docker Hub, you can also share your own image on it.

In this chapter we will demonstrate Docker image from Docker hub download and use of Jenkins.

Docker hub is the official site

https://hub.docker.com/

Installation Jenkins Docker image

1. Find jenkins docker mirrored on the docker hub

In the search box jenkins, find Jenkins official image, which is maintained by official Jenkins Mirror:

Docker HUB Jenkins mirror

2. Install the mirror

Command can be seen in the figure above is mounted, the installation command CentOS system:

[kevin@qikegu ~]$ sudo docker pull jenkins

For more information on the installation command, you can refer Jenkins image details page on Docker Hub.

3. Run Jenkins

To run Jenkins image, execute the following command in CentOS,

[kevin@qikegu ~]$ sudo docker run -p 8080:8080 -p 50000:50000 jenkins 

About the above command, note the following points

  • Use sudothe command to ensure that the command is run with root privileges.
  • jenkinsIs the image name.
  • -p <主机端口>:<容器端口> Docker mirrored internal port number mapped to the ports for host so that the external access.
  • This command in the Docker hub, Jenkins image details page contains a detailed account

Now, you have to let Jenkins as a container, successfully run.

Glossary

Docker we use a lot of terms that can be confusing. Before proceeding further, it is necessary to clearly understood that the common terms Docker Ecology.

  • Mirror / Image - Mirror template container is essentially a file system, and applications, including the file dependent. In the above demonstration, we use the docker pullcommand to download jenkins image.
  • Container / Container - the container is a running instance mirrored. We used docker runto start a container, you can use the docker pscommand to view the running container.
  • Docker daemon - that docker engine, manage mirror with container, running in the background on the host service. Linux daemon similar to the Windows background services.
  • Client Docker - Docker command-line tool to interact with the daemon. There are also graphical tools such as Kitematic .

Simply look analogy, mirroring similar to the executable file, similar to the process vessel, Docker background / client equivalent system platform, image management and container.

Guess you like

Origin blog.csdn.net/weixin_43031412/article/details/94550757