<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## Debian/Ubuntu Debian 和 Ubuntu 都是目前較為流行的 Debian 系的服務器操作系統,十分適合研發場景。Docker Hub 上提供了官方鏡像,國內各大容器云服務也基本都提供了相應的支持。 ### Debian 系統簡介 ![Debian 操作系統](https://box.kancloud.cn/05d00bdfc3d3923c5796d730dd1b7113_128x128.png) Debian 是由 GPL 和其他自由軟件許可協議授權的自由軟件組成的操作系統,由Debian 計劃(Debian Project)組織維護。Debian 計劃是一個獨立的、分散的組織,由 3000 人志愿者組成,接受世界多個非盈利組織的資金支持,Software in the Public Interest 提供支持并持有商標作為保護機構。Debian 以其堅守 Unix 和自由軟件的精神,以及其給予用戶的眾多選擇而聞名。現時 Debian 包括了超過 25,000 個軟件包并支持 12 個計算機系統結構。 Debian 作為一個大的系統組織框架,其下有多種不同操作系統核心的分支計劃,主要為采用 Linux 核心的 Debian GNU/Linux 系統,其他還有采用 GNU Hurd 核心的 Debian GNU/Hurd 系統、采用 FreeBSD 核心的 Debian GNU/kFreeBSD 系統,以及采用 NetBSD 核心的 Debian GNU/NetBSD 系統。甚至還有利用 Debian 的系統架構和工具,采用 OpenSolaris 核心構建而成的 Nexenta OS 系統。在這些 Debian 系統中,以采用 Linux 核心的 Debian GNU/Linux 最為著名。 眾多的 Linux 發行版,例如 Ubuntu、Knoppix 和 Linspire 及 Xandros 等,都基于 Debian GNU/Linux。 #### 使用 Debian 官方鏡像 讀者可以使用 docker search 搜索 Docker Hub,查找 Debian 鏡像: ```bash $ docker search debian NAME DESCRIPTION STARS OFFICIAL AUTOMATED debian Debian is... 1565 [OK] neurodebian NeuroDebian... 26 [OK] armbuild/debian port of debian 8 [OK] ... ``` 官方提供了大家熟知的 debian 鏡像以及面向科研領域的 neurodebian 鏡像。 可以使用 docker run 直接運行 Debian 鏡像。 ```bash $ docker run -it debian bash root@668e178d8d69:/# cat /etc/issue Debian GNU/Linux 8 ``` Debian 鏡像很適合作為基礎鏡像,構建自定義鏡像。 ### Ubuntu 系統簡介 ![Ubuntu 操作系統](https://box.kancloud.cn/f92f3610ccf15993be28eba77519eed8_128x128.jpg) Ubuntu 是一個以桌面應用為主的GNU/Linux操作系統,其名稱來自非洲南部祖魯語或豪薩語的“ubuntu”一詞(官方譯名“友幫拓”,另有“吾幫托”、“烏班圖”、“有奔頭”或“烏斑兔”等譯名)。Ubuntu 意思是“人性”以及“我的存在是因為大家的存在”,是非洲傳統的一種價值觀,類似華人社會的“仁愛”思想。 Ubuntu 基于 Debian 發行版和 GNOME/Unity 桌面環境,與 Debian 的不同在于它每 6 個月會發布一個新版本,每 2 年推出一個長期支持(Long Term Support,LTS)版本,一般支持 3 年時間。 #### 使用 Ubuntu 官方鏡像 Ubuntu 相關的鏡像有很多,這里使用 `--filter=stars=10` 參數,只搜索那些被收藏 10 次以上的鏡像。 ```bash $ docker search --filter=stars=10 ubuntu NAME DESCRIPTION STARS OFFICIAL AUTOMATED ubuntu Official Ubuntu base image 840 [OK] dockerfile/ubuntu Trusted automated Ubuntu (http://www.ubunt... 30 [OK] crashsystems/gitlab-docker A trusted, regularly updated build of GitL... 20 [OK] sylvainlasnier/memcached This is a Memcached 1.4.14 docker images b... 16 [OK] ubuntu-upstart Upstart is an event-based replacement for ... 16 [OK] mbentley/ubuntu-django-uwsgi-nginx 16 [OK] ansible/ubuntu14.04-ansible Ubuntu 14.04 LTS with ansible 15 [OK] clue/ttrss The Tiny Tiny RSS feed reader allows you t... 14 [OK] dockerfile/ubuntu-desktop Trusted automated Ubuntu Desktop (LXDE) (h... 14 [OK] tutum/ubuntu Ubuntu image with SSH access. For the root... 12 [OK] ``` 根據搜索出來的結果,讀者可以自行選擇下載鏡像并使用。 下面以 ubuntu 14.04 為例,演示如何使用該鏡像安裝一些常用軟件。 首先使用 `-ti` 參數啟動容器,登錄 bash,查看 ubuntu 的發行版本號。 ```bash $ docker run -ti ubuntu:14.04 /bin/bash root@7d93de07bf76:/# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.1 LTS Release: 14.04 Codename: trusty ``` 當試圖直接使用 `apt-get` 安裝一個軟件的時候,會提示 `E: Unable to locate package`。 ```bash root@7d93de07bf76:/# apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package curl ``` 這并非系統不支持 `apt-get` 命令。Docker 鏡像在制作時為了精簡清除了 apt 倉庫信息,因此需要先執行 `apt-get update` 命令來更新倉庫信息。更新信息后即可成功通過 apt-get 命令來安裝軟件。 ```bash root@7d93de07bf76:/# apt-get update Ign http://archive.ubuntu.com trusty InRelease Ign http://archive.ubuntu.com trusty-updates InRelease Ign http://archive.ubuntu.com trusty-security InRelease Ign http://archive.ubuntu.com trusty-proposed InRelease Get:1 http://archive.ubuntu.com trusty Release.gpg [933 B] ... ``` 首先,安裝 curl 工具。 ```bash root@7d93de07bf76:/# apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: ca-certificates krb5-locales libasn1-8-heimdal libcurl3 libgssapi-krb5-2 libgssapi3-heimdal libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libidn11 libk5crypto3 libkeyutils1 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libroken18-heimdal librtmp0 libsasl2-2 libsasl2-modules libsasl2-modules-db libwind0-heimdal openssl ... root@7d93de07bf76:/# curl curl: try 'curl --help' or 'curl --manual' for more information ``` 接下來,再安裝 apache 服務。 ```bash root@7d93de07bf76:/# apt-get install -y apache2 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-bin apache2-data libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libxml2 sgml-base ssl-cert xml-core ... ``` 啟動這個 apache 服務,然后使用 curl 來測試本地訪問。 ```bash root@7d93de07bf76:/# service apache2 start * Starting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message * root@7d93de07bf76:/# curl 127.0.0.1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Modified from the Debian original for Ubuntu Last updated: 2014-03-19 See: https://launchpad.net/bugs/1288690 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Apache2 Ubuntu Default Page: It works</title> <style type="text/css" media="screen"> ... ``` 配合使用 `-p` 參數對外映射服務端口,可以允許容器外來訪問該服務。 ### 相關資源 * `Debian` 官網:https://www.debian.org/ * `Neuro Debian` 官網:http://neuro.debian.net/ * `Debian` 官方倉庫:https://github.com/Debian * `Debian` 官方鏡像:https://hub.docker.com/_/debian/ * `Debian` 官方鏡像倉庫:https://github.com/tianon/docker-brew-debian/ * `Ubuntu` 官網:http://www.ubuntu.org.cn/global * `Ubuntu` 官方倉庫:https://github.com/ubuntu * `Ubuntu` 官方鏡像:https://hub.docker.com/_/ubuntu/ * `Ubuntu` 官方鏡像倉庫:https://github.com/tianon/docker-brew-ubuntu-core
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看