<small id='iTiLM'></small><noframes id='iTiLM'>

    • <bdo id='iTiLM'></bdo><ul id='iTiLM'></ul>
    <tfoot id='iTiLM'></tfoot>

  1. <legend id='iTiLM'><style id='iTiLM'><dir id='iTiLM'><q id='iTiLM'></q></dir></style></legend>
    <i id='iTiLM'><tr id='iTiLM'><dt id='iTiLM'><q id='iTiLM'><span id='iTiLM'><b id='iTiLM'><form id='iTiLM'><ins id='iTiLM'></ins><ul id='iTiLM'></ul><sub id='iTiLM'></sub></form><legend id='iTiLM'></legend><bdo id='iTiLM'><pre id='iTiLM'><center id='iTiLM'></center></pre></bdo></b><th id='iTiLM'></th></span></q></dt></tr></i><div id='iTiLM'><tfoot id='iTiLM'></tfoot><dl id='iTiLM'><fieldset id='iTiLM'></fieldset></dl></div>

      Docker 图像 - 类型.修身vs修身弹力vs弹力vs高山

      时间:2023-09-30
      <legend id='aGSYQ'><style id='aGSYQ'><dir id='aGSYQ'><q id='aGSYQ'></q></dir></style></legend>

      <small id='aGSYQ'></small><noframes id='aGSYQ'>

      1. <tfoot id='aGSYQ'></tfoot>

          <tbody id='aGSYQ'></tbody>

                <bdo id='aGSYQ'></bdo><ul id='aGSYQ'></ul>
              • <i id='aGSYQ'><tr id='aGSYQ'><dt id='aGSYQ'><q id='aGSYQ'><span id='aGSYQ'><b id='aGSYQ'><form id='aGSYQ'><ins id='aGSYQ'></ins><ul id='aGSYQ'></ul><sub id='aGSYQ'></sub></form><legend id='aGSYQ'></legend><bdo id='aGSYQ'><pre id='aGSYQ'><center id='aGSYQ'></center></pre></bdo></b><th id='aGSYQ'></th></span></q></dt></tr></i><div id='aGSYQ'><tfoot id='aGSYQ'></tfoot><dl id='aGSYQ'><fieldset id='aGSYQ'></fieldset></dl></div>
                本文介绍了Docker 图像 - 类型.修身vs修身弹力vs弹力vs高山的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我正在寻找一个 docker 映像来构建一个 java 应用程序并查看可用的 OpenJDK 映像的变体.我在看这里 https://github.com/docker-library/openjdk/tree/master/8/jdk 并查看 alpine、slim 和 windows.这些之间有什么区别以及每个变体给出什么?

                I am looking to pick up a docker image to build a java app and looking at the variants of the OpenJDK images available. I am looking here https://github.com/docker-library/openjdk/tree/master/8/jdk and see alpine, slim and windows. What are the differences between these and what does each variant give?

                推荐答案

                每个 docker 库文档(下面的引用和链接),这里是一个摘要:

                Per docker library docs (quote and links below), here's a summary:

                • openjdk:<版本>

                事实上的形象.如果不确定,请使用它.

                The defacto image. Use it if unsure.

                • openjdk:-busteropenjdk:-stretchopenjdk:-jessie

                busterjessiestretch 是 Debian 并指明映像基于哪个发行版.

                buster, jessie or stretch are the suite code names for releases of Debian and indicate which release the image is based on.

                • openjdk:-alpine

                同样,此映像基于 Alpine Linux,因此是一个非常小的基础映像.如果您需要图像尺寸尽可能小,建议使用.需要注意的是它使用了一些不寻常的库,但对于大多数软件来说应该不是问题.如有疑问,请查看以下官方文档.

                Similarly, this image is based on the Alpine Linux, thus being a very small base image. It is recommended if you need an image size is as small as possible. The caveat is that it uses some unusual libs, but shouldn't be a problem for most software. In doubt, check the official docs below.

                • openjdk:(从 12 开始),openjdk:-oracleopenjdk:;-oraclelinux7

                • openjdk:<version> (from 12 onwards), openjdk:<version>-oracle and openjdk:<version>-oraclelinux7

                openjdk:12 开始的默认镜像以及 -oracle-oraclelinux7 变体都是基于官方的 Oracle Linux 7 映像.默认映像中的 OpenJDK 二进制文件以及 -oracle-oraclelinux7 变体由 Oracle 构建,并来自 OpenJDK 社区.

                Starting with openjdk:12 the default image as well as the -oracle and -oraclelinux7 variants are based on the official Oracle Linux 7 image. The OpenJDK binaries in the default image as well as the -oracle and -oraclelinux7 variants are built by Oracle and are sourced from the OpenJDK community.

                • openjdk:-slim

                此图像仅包含运行 Java 所需的最少包(例如,缺少许多与 UI 相关的 Java 库).除非您在 openjdk 映像将被部署并且您有空间限制的环境中工作,否则建议使用默认映像而不是此映像.

                This image only contains the minimal packages needed to run Java (and is missing many of the UI-related Java libraries, for instance). Unless you are working in an environment where only the openjdk image will be deployed and you have space constraints, the default image is recommended over this one.

                • openjdk:-windowsservercore

                此映像基于 Windows Server Core (microsoft/windowsservercore).

                This image is based on Windows Server Core (microsoft/windowsservercore).


                完整文档(此处显示的版本,这里是最新版本):

                openjdk 图像有多种风格,每一种都是为具体用例.

                Image Variants

                The openjdk images come in many flavors, each designed for a specific use case.

                这是事实上的图像.如果您不确定自己的需求是,你可能想用这个.它被设计为同时使用作为一个扔掉的容器(安装你的源代码并启动容器来启动您的应用程序),以及构建其他应用程序的基础图像关闭.

                This is the defacto image. If you are unsure about what your needs are, you probably want to use this one. It is designed to be used both as a throw away container (mount your source code and start the container to start your app), as well as the base to build other images off of.

                其中一些标签可能包含像 jessie 或拉伸这样的名称.这些是版本的套件代号Debian 并指出哪个发布图像是基于.

                Some of these tags may have names like jessie or stretch in them. These are the suite code names for releases of Debian and indicate which release the image is based on.

                此图像基于流行的 Alpine Linux项目,在 alpine 官方提供图片.Alpine Linux 要小得多比大多数分发基础图像(~5MB),因此导致很多总体而言,图像更窄.

                This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

                当最终图像大小为尽可能小.需要注意的主要警告是它确实使用 musl libc 而不是 glibc 和朋友,那么肯定软件可能会遇到问题,具体取决于其 libc 的深度要求.但是,大多数软件都没有这个问题,所以这个变体通常是一个非常安全的选择.查看这个黑客新闻评论线程更多讨论可能出现的问题和一些赞成/反对使用基于 Alpine 的图像的比较.

                This variant is highly recommended when final image size being as small as possible is desired. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.

                为了最小化图像大小,额外的相关工具并不常见(例如 gitbash)要包含在基于 Alpine 的图像中.使用以此图像为基础,在自己的 Dockerfile 中添加你需要的东西(参见 alpine 图像描述 举例说明如何如果您不熟悉,请安装软件包.

                To minimize image size, it's uncommon for additional related tools (such as git or bash) to be included in Alpine-based images. Using this image as a base, add the things you need in your own Dockerfile (see the alpine image description for examples of how to install packages if you are unfamiliar).

                此图像基于 Windows Server Core(microsoft/windowsservercore).因此,它仅适用于该图像的位置,例如Windows 10 专业版/企业版(周年纪念版)或 Windows服务器 2016.

                This image is based on Windows Server Core (microsoft/windowsservercore). As such, it only works in places which that image does, such as Windows 10 Professional/Enterprise (Anniversary Edition) or Windows Server 2016.

                有关如何让 Docker 在 Windows 上运行的信息,请参阅微软提供的相关快速入门"指南:

                For information about how to get Docker running on Windows, please see the relevant "Quick Start" guide provided by Microsoft:

                • Windows Server 快速入门
                • Windows 10 快速入门

                这个镜像安装了 OpenJDK 的 -headless 包,所以是缺少许多与 UI 相关的 Java 库和一些常用包包含在默认标签中.它只包含最小的包需要运行 Java.除非你在一个环境中工作只有 openjdk 镜像会被部署并且你有空间限制,我们强烈推荐使用这个默认镜像存储库.

                This image installs the -headless package of OpenJDK and so is missing many of the UI-related Java libraries and some common packages contained in the default tag. It only contains the minimal packages needed to run Java. Unless you are working in an environment where only the openjdk image will be deployed and you have space constraints, we highly recommend using the default image of this repository.

                这篇关于Docker 图像 - 类型.修身vs修身弹力vs弹力vs高山的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  <bdo id='6nnaH'></bdo><ul id='6nnaH'></ul>
                  <tfoot id='6nnaH'></tfoot>
                    <tbody id='6nnaH'></tbody>

                    1. <legend id='6nnaH'><style id='6nnaH'><dir id='6nnaH'><q id='6nnaH'></q></dir></style></legend>
                      <i id='6nnaH'><tr id='6nnaH'><dt id='6nnaH'><q id='6nnaH'><span id='6nnaH'><b id='6nnaH'><form id='6nnaH'><ins id='6nnaH'></ins><ul id='6nnaH'></ul><sub id='6nnaH'></sub></form><legend id='6nnaH'></legend><bdo id='6nnaH'><pre id='6nnaH'><center id='6nnaH'></center></pre></bdo></b><th id='6nnaH'></th></span></q></dt></tr></i><div id='6nnaH'><tfoot id='6nnaH'></tfoot><dl id='6nnaH'><fieldset id='6nnaH'></fieldset></dl></div>

                      • <small id='6nnaH'></small><noframes id='6nnaH'>