• 使用 docker 拉取镜像和创建容器-nginx


    本文主要分享通过从docker  hub上获取nginx镜像

    1、首先查找nginx镜像

    [root@node1 ~]# docker search nginx
    NAME                                                   DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
    nginx                                                  Official build of Nginx.                        8238                [OK]                
    jwilder/nginx-proxy                                    Automated Nginx reverse proxy for docker con…   1301                                    [OK]
    richarvey/nginx-php-fpm                                Container running Nginx + PHP-FPM capable of…   538                                     [OK]
    jrcs/letsencrypt-nginx-proxy-companion                 LetsEncrypt container to use with nginx as p…   335                                     [OK]
    kong                                                   Open-source Microservice & API Management la…   170                 [OK]                
    webdevops/php-nginx                                    Nginx with PHP-FPM                              97                                      [OK]
    kitematic/hello-world-nginx                            A light-weight nginx container that demonstr…   95                                      
    zabbix/zabbix-web-nginx-mysql                          Zabbix frontend based on Nginx web-server wi…   48                                      [OK]
    bitnami/nginx                                          Bitnami nginx Docker Image                      45                                      [OK]
    linuxserver/nginx                                      An Nginx container, brought to you by LinuxS…   33                                      
    1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5   ubuntu-16-nginx-php-phpmyadmin-mysql-5          30                                      [OK]
    tobi312/rpi-nginx                                      NGINX on Raspberry Pi / armhf                   19                                      [OK]
    wodby/drupal-nginx                                     Nginx for Drupal container image                9                                       [OK]
    nginxdemos/nginx-ingress                               NGINX Ingress Controller for Kubernetes         8                                       
    blacklabelops/nginx                                    Dockerized Nginx Reverse Proxy Server.          8                                       [OK]
    webdevops/nginx                                        Nginx container                                 8                                       [OK]
    centos/nginx-18-centos7                                Platform for running nginx 1.8 or building n…   6                                       
    1science/nginx                                         Nginx Docker images that include Consul Temp…   4                                       [OK]
    nginxdemos/hello                                       NGINX webserver that serves a simple page co…   4                                       [OK]
    centos/nginx-112-centos7                               Platform for running nginx 1.12 or building …   3                                       
    pebbletech/nginx-proxy                                 nginx-proxy sets up a container running ngin…   2                                       [OK]
    behance/docker-nginx                                   Provides base OS, patches and stable nginx f…   2                                       [OK]
    toccoag/openshift-nginx                                Nginx reverse proxy for Nice running on same…   1                                       [OK]
    travix/nginx                                           NGinx reverse proxy                             1                                       [OK]
    mailu/nginx                                            Mailu nginx frontend                            0                                       [OK]

    2、拉取官网的nginx镜像

    [root@node1 ~]# docker pull nginx
    Using default tag: latest
    latest: Pulling from library/nginx
    2a72cbf407d6: Pull complete 
    fefa2faca81f: Pull complete 
    080aeede8114: Pull complete 
    Digest: sha256:c4ee0ecb376636258447e1d8effb56c09c75fe7acf756bf7c13efadf38aa0aca
    Status: Downloaded newer image for nginx:latest

    3、查看获取到的镜像文件

    [root@node1 ~]# docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    nginx               latest              7f70b30f2cc6        7 days ago          109MB
    ubuntu              14.04               a35e70164dfb        3 weeks ago         222MB
    ubuntu              17.10               1af812152d85        3 weeks ago         98.4MB

    4、启动nginx 容器

    [root@node1 ~]# docker run -d -p 80:80 nginx
    759d6d37858bcc70867321759df12d2881e6399204f2ba6a4b8b10aaea430da3

    5、 启动后nginx 验证

    到此通过docker 安装nginx完成。 

  • 相关阅读:
    【转】C#常用的集合类型(ArrayList类、Stack类、Queue类、Hashtable类、SortedList类)
    【转】第三方控件安装方法
    【jQuery插件】chackTextarea类似于新浪腾讯微博文本域字符数判断
    【转】关于wBox iFrame回调关闭问题的解决方案
    【转】jquery插件
    db4o助手 do4oHelper
    【转】C# 中文URL编码
    【转】C#集合之Hashtable
    【转】Web页面导出标准的Excel/Word/txt的代码实现
    jQuery图片居中裁切效果
  • 原文地址:https://www.cnblogs.com/KunGe-13/p/8670942.html
Copyright © 2020-2023  润新知