<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.opseas.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnson</id>
	<title>開源之海 - 用户贡献 [zh-cn]</title>
	<link rel="self" type="application/atom+xml" href="https://www.opseas.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johnson"/>
	<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/Johnson"/>
	<updated>2026-06-12T22:51:02Z</updated>
	<subtitle>用户贡献</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/image&amp;diff=157</id>
		<title>基礎原理:容器技术/Docker/Concepts/image</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/image&amp;diff=157"/>
		<updated>2026-05-08T09:10:17Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 说明 ==&lt;br /&gt;
鑑於容器是一個隔離的進程, 它從哪裡取得檔案和設定？該如何共享這些環境？&lt;br /&gt;
&lt;br /&gt;
That&#039;s where container images come in. A container image is a standardized package that includes all of the files, binaries, libraries, and configurations to run a container.&lt;br /&gt;
&lt;br /&gt;
For a PostgreSQL image, that image will package the database binaries, config files, and other dependencies. For a Python web app, it&#039;ll include the Python runtime, your app code, and all of its dependencies.&lt;br /&gt;
&lt;br /&gt;
There are two important principles of images:&lt;br /&gt;
&lt;br /&gt;
# Images are immutable. Once an image is created, it can&#039;t be modified. You can only make a new image or add changes on top of it.&lt;br /&gt;
# Container images are composed of layers. Each layer represents a set of file system changes that add, remove, or modify files.&lt;br /&gt;
&lt;br /&gt;
These two principles let you to extend or add to existing images. For example, if you are building a Python app, you can start from the Python image and add additional layers to install your app&#039;s dependencies and add your code. This lets you focus on your app, rather than Python itself.&lt;br /&gt;
&lt;br /&gt;
=== Finding images ===&lt;br /&gt;
Docker Hub is the default global marketplace for storing and distributing images. It has over 100,000 images created by developers that you can run locally. You can search for Docker Hub images and run them directly from Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
Docker Hub provides a variety of Docker-supported and endorsed images known as Docker Trusted Content. These provide fully managed services or great starters for your own images. These include:&lt;br /&gt;
&lt;br /&gt;
* Docker Official Images - a curated set of Docker repositories, serve as the starting point for the majority of users, and are some of the most secure on Docker Hub&lt;br /&gt;
* Docker Hardened Images - minimal, secure, production-ready images with near-zero CVEs, designed to reduce attack surface and simplify compliance. Free and open source under Apache 2.0&lt;br /&gt;
* Docker Verified Publishers - high-quality images from commercial publishers verified by Docker&lt;br /&gt;
* Docker-Sponsored Open Source - images published and maintained by open-source projects sponsored by Docker through Docker&#039;s open source program&lt;br /&gt;
&lt;br /&gt;
For example, Redis and Memcached are a few popular ready-to-go Docker Official Images. You can download these images and have these services up and running in a matter of seconds. There are also base images, like the Node.js Docker image, that you can use as a starting point and add your own files and configurations. For production workloads requiring enhanced security, Docker Hardened Images offer minimal variants of popular images like Node.js, Python, and Go.&lt;br /&gt;
&lt;br /&gt;
== Try it out ==&lt;br /&gt;
Follow the instructions to search and pull a Docker image using CLI to view its layers.&lt;br /&gt;
Search for and download an image&lt;br /&gt;
# Open a terminal and search for images using the docker search command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
docker search docker/welcome-to-docker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You will see output like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
NAME                       DESCRIPTION                                     STARS     OFFICIAL&lt;br /&gt;
docker/welcome-to-docker   Docker image for new users getting started wâ¦   20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This output shows you information about relevant images available on Docker Hub.&lt;br /&gt;
# Pull the image using the docker pull command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
docker pull docker/welcome-to-docker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You will see output like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
Using default tag: latest&lt;br /&gt;
latest: Pulling from docker/welcome-to-docker&lt;br /&gt;
579b34f0a95b: Download complete&lt;br /&gt;
d11a451e6399: Download complete&lt;br /&gt;
1c2214f9937c: Download complete&lt;br /&gt;
b42a2f288f4d: Download complete&lt;br /&gt;
54b19e12c655: Download complete&lt;br /&gt;
1fb28e078240: Download complete&lt;br /&gt;
94be7e780731: Download complete&lt;br /&gt;
89578ce72c35: Download complete&lt;br /&gt;
Digest: sha256:eedaff45e3c78538087bdd9dc7afafac7e110061bbdd836af4104b10f10ab693&lt;br /&gt;
Status: Downloaded newer image for docker/welcome-to-docker:latest&lt;br /&gt;
docker.io/docker/welcome-to-docker:latest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Each of line represents a different downloaded layer of the image. Remember that each layer is a set of filesystem changes and provides functionality of the image.&lt;br /&gt;
&lt;br /&gt;
=== Learn about the image ===&lt;br /&gt;
&lt;br /&gt;
# List your downloaded images using the &amp;lt;code&amp;gt;docker image ls&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker image ls&amp;lt;/code&amp;gt;&lt;br /&gt;
 You will see output like the following:&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
REPOSITORY                 TAG       IMAGE ID       CREATED        SIZE&lt;br /&gt;
docker/welcome-to-docker   latest    eedaff45e3c7   4 months ago   29.7MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 The command shows a list of Docker images currently available on your system. The docker/welcome-to-docker has a total size of approximately 29.7MB.&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
    Image size&lt;br /&gt;
&lt;br /&gt;
    The image size represented here reflects the uncompressed size of the image, not the download size of the layers.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# List the image&#039;s layers using the &amp;lt;code&amp;gt;docker image history&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;docker image history docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
 You will see output like the following:&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
IMAGE          CREATED        CREATED BY                                      SIZE      COMMENT&lt;br /&gt;
648f93a1ba7d   4 months ago   COPY /app/build /usr/share/nginx/html # buil…   1.6MB     buildkit.dockerfile.v0&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  CMD [&amp;quot;nginx&amp;quot; &amp;quot;-g&amp;quot; &amp;quot;daemon…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  STOPSIGNAL SIGQUIT           0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  EXPOSE 80                    0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENTRYPOINT [&amp;quot;/docker-entr…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:9e3b2b63db9f8fc7…   4.62kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:57846632accc8975…   3.02kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:3b1b9915b7dd898a…   298B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:caec368f5a54f70a…   2.12kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:01e75c6dd0ce317d…   1.62kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c set -x     &amp;amp;&amp;amp; addgroup -g 101 -S …   9.7MB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENV PKG_RELEASE=1            0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENV NGINX_VERSION=1.25.3     0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  LABEL maintainer=NGINX Do…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  CMD [&amp;quot;/bin/sh&amp;quot;]              0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) ADD file:ff3112828967e8004…   7.66MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 This output shows you all of the layers, their sizes, and the command used to create the layer.&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
    Viewing the full command&lt;br /&gt;
&lt;br /&gt;
    If you add the --no-trunc flag to the command, you will see the full command. Note that, since the output is in a table-like format, longer commands will cause the output to be very difficult to navigate.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 In this walkthrough, you searched and pulled a Docker image. In addition to pulling a Docker image, you also learned about the layers of a Docker Image.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/image&amp;diff=156</id>
		<title>基礎原理:容器技术/Docker/Concepts/image</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/image&amp;diff=156"/>
		<updated>2026-05-08T09:04:10Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​创建页面，内容为“== Explanation == Seeing as a container is an isolated process, where does it get its files and configuration? How do you share those environments?  That&amp;#039;s where container images come in. A container image is a standardized package that includes all of the files, binaries, libraries, and configurations to run a container.  For a PostgreSQL image, that image will package the database binaries, config files, and other dependencies. For a Python web app, it&amp;#039;ll inc…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Explanation ==&lt;br /&gt;
Seeing as a container is an isolated process, where does it get its files and configuration? How do you share those environments?&lt;br /&gt;
&lt;br /&gt;
That&#039;s where container images come in. A container image is a standardized package that includes all of the files, binaries, libraries, and configurations to run a container.&lt;br /&gt;
&lt;br /&gt;
For a PostgreSQL image, that image will package the database binaries, config files, and other dependencies. For a Python web app, it&#039;ll include the Python runtime, your app code, and all of its dependencies.&lt;br /&gt;
&lt;br /&gt;
There are two important principles of images:&lt;br /&gt;
&lt;br /&gt;
# Images are immutable. Once an image is created, it can&#039;t be modified. You can only make a new image or add changes on top of it.&lt;br /&gt;
# Container images are composed of layers. Each layer represents a set of file system changes that add, remove, or modify files.&lt;br /&gt;
&lt;br /&gt;
These two principles let you to extend or add to existing images. For example, if you are building a Python app, you can start from the Python image and add additional layers to install your app&#039;s dependencies and add your code. This lets you focus on your app, rather than Python itself.&lt;br /&gt;
&lt;br /&gt;
=== Finding images ===&lt;br /&gt;
Docker Hub is the default global marketplace for storing and distributing images. It has over 100,000 images created by developers that you can run locally. You can search for Docker Hub images and run them directly from Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
Docker Hub provides a variety of Docker-supported and endorsed images known as Docker Trusted Content. These provide fully managed services or great starters for your own images. These include:&lt;br /&gt;
&lt;br /&gt;
* Docker Official Images - a curated set of Docker repositories, serve as the starting point for the majority of users, and are some of the most secure on Docker Hub&lt;br /&gt;
* Docker Hardened Images - minimal, secure, production-ready images with near-zero CVEs, designed to reduce attack surface and simplify compliance. Free and open source under Apache 2.0&lt;br /&gt;
* Docker Verified Publishers - high-quality images from commercial publishers verified by Docker&lt;br /&gt;
* Docker-Sponsored Open Source - images published and maintained by open-source projects sponsored by Docker through Docker&#039;s open source program&lt;br /&gt;
&lt;br /&gt;
For example, Redis and Memcached are a few popular ready-to-go Docker Official Images. You can download these images and have these services up and running in a matter of seconds. There are also base images, like the Node.js Docker image, that you can use as a starting point and add your own files and configurations. For production workloads requiring enhanced security, Docker Hardened Images offer minimal variants of popular images like Node.js, Python, and Go.&lt;br /&gt;
&lt;br /&gt;
== Try it out ==&lt;br /&gt;
Follow the instructions to search and pull a Docker image using CLI to view its layers.&lt;br /&gt;
Search for and download an image&lt;br /&gt;
# Open a terminal and search for images using the docker search command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
docker search docker/welcome-to-docker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You will see output like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
NAME                       DESCRIPTION                                     STARS     OFFICIAL&lt;br /&gt;
docker/welcome-to-docker   Docker image for new users getting started wâ¦   20&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This output shows you information about relevant images available on Docker Hub.&lt;br /&gt;
# Pull the image using the docker pull command.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
docker pull docker/welcome-to-docker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
You will see output like the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
Using default tag: latest&lt;br /&gt;
latest: Pulling from docker/welcome-to-docker&lt;br /&gt;
579b34f0a95b: Download complete&lt;br /&gt;
d11a451e6399: Download complete&lt;br /&gt;
1c2214f9937c: Download complete&lt;br /&gt;
b42a2f288f4d: Download complete&lt;br /&gt;
54b19e12c655: Download complete&lt;br /&gt;
1fb28e078240: Download complete&lt;br /&gt;
94be7e780731: Download complete&lt;br /&gt;
89578ce72c35: Download complete&lt;br /&gt;
Digest: sha256:eedaff45e3c78538087bdd9dc7afafac7e110061bbdd836af4104b10f10ab693&lt;br /&gt;
Status: Downloaded newer image for docker/welcome-to-docker:latest&lt;br /&gt;
docker.io/docker/welcome-to-docker:latest&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Each of line represents a different downloaded layer of the image. Remember that each layer is a set of filesystem changes and provides functionality of the image.&lt;br /&gt;
&lt;br /&gt;
=== Learn about the image ===&lt;br /&gt;
&lt;br /&gt;
# List your downloaded images using the &amp;lt;code&amp;gt;docker image ls&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker image ls&amp;lt;/code&amp;gt;&lt;br /&gt;
 You will see output like the following:&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
REPOSITORY                 TAG       IMAGE ID       CREATED        SIZE&lt;br /&gt;
docker/welcome-to-docker   latest    eedaff45e3c7   4 months ago   29.7MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 The command shows a list of Docker images currently available on your system. The docker/welcome-to-docker has a total size of approximately 29.7MB.&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
    Image size&lt;br /&gt;
&lt;br /&gt;
    The image size represented here reflects the uncompressed size of the image, not the download size of the layers.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
# List the image&#039;s layers using the &amp;lt;code&amp;gt;docker image history&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;docker image history docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
 You will see output like the following:&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
IMAGE          CREATED        CREATED BY                                      SIZE      COMMENT&lt;br /&gt;
648f93a1ba7d   4 months ago   COPY /app/build /usr/share/nginx/html # buil…   1.6MB     buildkit.dockerfile.v0&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  CMD [&amp;quot;nginx&amp;quot; &amp;quot;-g&amp;quot; &amp;quot;daemon…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  STOPSIGNAL SIGQUIT           0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  EXPOSE 80                    0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENTRYPOINT [&amp;quot;/docker-entr…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:9e3b2b63db9f8fc7…   4.62kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:57846632accc8975…   3.02kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:3b1b9915b7dd898a…   298B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:caec368f5a54f70a…   2.12kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) COPY file:01e75c6dd0ce317d…   1.62kB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c set -x     &amp;amp;&amp;amp; addgroup -g 101 -S …   9.7MB&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENV PKG_RELEASE=1            0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  ENV NGINX_VERSION=1.25.3     0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  LABEL maintainer=NGINX Do…   0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop)  CMD [&amp;quot;/bin/sh&amp;quot;]              0B&lt;br /&gt;
&amp;lt;missing&amp;gt;      5 months ago   /bin/sh -c #(nop) ADD file:ff3112828967e8004…   7.66MB&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 This output shows you all of the layers, their sizes, and the command used to create the layer.&lt;br /&gt;
 &amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
    Viewing the full command&lt;br /&gt;
&lt;br /&gt;
    If you add the --no-trunc flag to the command, you will see the full command. Note that, since the output is in a table-like format, longer commands will cause the output to be very difficult to navigate.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
 In this walkthrough, you searched and pulled a Docker image. In addition to pulling a Docker image, you also learned about the layers of a Docker Image.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=155</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=155"/>
		<updated>2026-05-08T08:53:00Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/container|什么是容器]]&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/image|什么是镜像]]&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/registry|什么是注册机构]]&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/compose|什么是Docker Compose]]&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
* 理解镜像的分层&lt;br /&gt;
* 编写一个Dockerfile&lt;br /&gt;
* 创建，标记，并发布一个镜像&lt;br /&gt;
* 使用创建缓存&lt;br /&gt;
* 多階段建置&lt;br /&gt;
&lt;br /&gt;
运行容器&lt;br /&gt;
* 发布并暴露端口&lt;br /&gt;
* 改写容器默认(配置或参数)&lt;br /&gt;
* 持久化容器数据&lt;br /&gt;
* 与容器分享本地文件&lt;br /&gt;
* 多容器應用程式&lt;br /&gt;
&lt;br /&gt;
[[基礎原理:容器技术/Docker/Engine|返回Docker引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=154</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=154"/>
		<updated>2026-05-08T08:49:30Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;提示:&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;-a标记去显示所有的容器:&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=153</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=153"/>
		<updated>2026-05-08T08:47:46Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;docker&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;提示:&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;-a标记去显示所有的容器:&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=152</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=152"/>
		<updated>2026-05-08T08:45:29Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;提示:&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;/code&amp;gt;&amp;lt;code&amp;gt;-a标记去显示所有的容器:&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=151</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=151"/>
		<updated>2026-05-08T08:43:36Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;提示&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt;标记去显示所有的容器: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=150</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=150"/>
		<updated>2026-05-08T08:42:18Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;提示&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt;标记去显示所有的容器: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=149</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=149"/>
		<updated>2026-05-08T08:41:04Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;提示&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt;标记去显示所有的容器: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=148</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=148"/>
		<updated>2026-05-08T08:40:10Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
CONTAINER ID   IMAGE  COMMAND CREATED STATUS PORTS NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/div&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;提示&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt;标记去显示所有的容器: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=147</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=147"/>
		<updated>2026-05-08T08:32:30Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;CONTAINER ID   IMAGE                      COMMAND                  CREATED          STATUS          PORTS                      NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
此容器執行一個網頁伺服器，用以顯示一個簡單的網站。當處理較複雜的專案時，您會將不同的部分分別在不同的容器中執行。例如，為&amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;,和&amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;code&amp;gt;提示&lt;br /&gt;
&amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;命令将显示 &#039;&#039;仅仅&#039;&#039; 运行的容器. 为查看停止的容器,请添加a&amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt;标记去显示所有的容器: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 访问前端 ===&lt;br /&gt;
當您啟動容器時，您已將容器的一個埠對外公開至您的電腦。您可以將此視為建立了一項設定，讓您能夠透過容器的隔離環境進行連線.&lt;br /&gt;
&lt;br /&gt;
對於此容器，前端可透過端口 &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. 要開啟該網站，請點選 &#039;&#039;&#039;Port(s)&#039;&#039;&#039; 容器的欄位，或造訪 &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; 在您的瀏覽器中.&lt;br /&gt;
&lt;br /&gt;
=== 停止您的容器 ===&lt;br /&gt;
&amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; 容器會持續執行，直到您停止它為止。您可以使用 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令.&lt;br /&gt;
&lt;br /&gt;
# 运行 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 取得容器的 ID&lt;br /&gt;
# 請提供容器的ID或名稱至 &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; 命令:  &amp;lt;code&amp;gt;docker stop &amp;lt;容器 ID&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
提示&lt;br /&gt;
透過 ID 引用容器時，無需提供完整的 ID。只需提供足以確保其唯一性的部分 ID 即可。例如，可透過執行以下指令來停止前一個容器:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=146</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=146"/>
		<updated>2026-05-08T08:20:37Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 說明 ==&lt;br /&gt;
假設你正在開發一款功能強大的網頁應用程式，它包含三個主要組件 - 一個 React 前端、一個 Python API 以及一個 PostgreSQL 資料庫。若您想參與此專案，必須安裝 Node、Python 和 PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
您如何確保自己使用的版本與團隊中其他開發人員、CI/CD 系統，或是生產環境中使用的版本一致？&lt;br /&gt;
&lt;br /&gt;
您如何確保應用程式所需的 Python（或 Node、資料庫）版本不會受到電腦上現有軟體的影響？您如何處理潛在的衝突？?&lt;br /&gt;
&lt;br /&gt;
容器登場！&lt;br /&gt;
&lt;br /&gt;
什麼是容器？簡單來說，容器就是為應用程式的每個元件所建立的隔離進程。每個元件——無論是前端的 React 應用程式、Python API 引擎，還是資料庫——都在各自的隔離環境中運行，與機器上的其他一切完全隔離。&lt;br /&gt;
&lt;br /&gt;
以下就是它們如此出色的原因。容器是:&lt;br /&gt;
&lt;br /&gt;
* 自包含。每個容器都具備運作所需的一切，無需依賴主機上預先安裝的任何依賴項.&lt;br /&gt;
* 隔離。由於容器在隔離環境中運行，因此對主機和其他容器的影響極小，從而提升了應用程式的安全性.&lt;br /&gt;
* 獨立運作。每個容器皆獨立管理。刪除其中一個容器不會影響其他容器.&lt;br /&gt;
* 可攜式。容器可在任何地方運行！在您的開發機器上運行的容器，在資料中心或雲端任何地方都能以相同方式運作!&lt;br /&gt;
&lt;br /&gt;
=== 容器與虛擬機器的比較 (VMs) ===&lt;br /&gt;
不深入探討細節的話，虛擬機器（VM）是一個完整的作業系統，擁有自己的核心、硬體驅動程式、程式及應用程式。僅為了隔離單一應用程式而啟動虛擬機器，會造成相當大的系統負擔.&lt;br /&gt;
&lt;br /&gt;
容器本質上是一個獨立的進程，其中包含其運行所需的所有檔案。若同時執行多個容器，它們將共用同一個核心，讓您能在更少的基礎設施上運行更多應用程式.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;同時使用虛擬機器與容器&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
在許多情況下，您會看到容器與虛擬機器（VM）被併用。舉例來說，在雲端環境中，所配置的機器通常是虛擬機器。然而，與其為運行單一應用程式而配置一台機器，配備容器執行環境的虛擬機器可以同時運行多個容器化應用程式，從而提高資源利用率並降低成本.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 試試看 ==&lt;br /&gt;
在這項實作中，您將了解如何透過 Docker CLI介面執行Docker容器.&lt;br /&gt;
請依照指示，使用命令列介面 (CLI) 執行容器:&lt;br /&gt;
# 開啟您的 CLI 終端機，並使用 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;$docker run -d -p 8080:80 docker/welcome-to-docker&amp;lt;/code&amp;gt;&lt;br /&gt;
此命令的輸出結果是完整的容器 ID.&lt;br /&gt;
恭喜！您剛啟動了第一個容器! 🎉&lt;br /&gt;
&lt;br /&gt;
=== 檢視正在執行的容器 ===&lt;br /&gt;
您可以透過以下方式確認容器是否已啟動並正在運行： &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; 命令:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt;&lt;br /&gt;
您將看到類似以下的輸出:&lt;br /&gt;
 &amp;lt;code&amp;gt;CONTAINER ID   IMAGE                      COMMAND                  CREATED          STATUS          PORTS                      NAMES&lt;br /&gt;
a1f7a4bb3a27   docker/welcome-to-docker   &amp;quot;/docker-entrypoint.…&amp;quot;   11 seconds ago   Up 11 seconds   0.0.0.0:8080-&amp;gt;80/tcp       gracious_keldysh&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This container runs a web server that displays a simple website. When working with more complex projects, you&#039;ll run different parts in different containers. For example, a different container for the &amp;lt;code&amp;gt;frontend&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;backend&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;database&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Tip&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; command will show you &#039;&#039;only&#039;&#039; running containers. To view stopped containers, add the &amp;lt;code&amp;gt;-a&amp;lt;/code&amp;gt; flag to list all containers: &amp;lt;code&amp;gt;docker ps -a&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Access the frontend ===&lt;br /&gt;
When you launched the container, you exposed one of the container&#039;s ports onto your machine. Think of this as creating configuration to let you to connect through the isolated environment of the container.&lt;br /&gt;
&lt;br /&gt;
For this container, the frontend is accessible on port &amp;lt;code&amp;gt;8080&amp;lt;/code&amp;gt;. To open the website, select the link in the &#039;&#039;&#039;Port(s)&#039;&#039;&#039; column of your container or visit &amp;lt;nowiki&amp;gt;http://localhost:8080&amp;lt;/nowiki&amp;gt; in your browser.&lt;br /&gt;
&lt;br /&gt;
=== Stop your container ===&lt;br /&gt;
The &amp;lt;code&amp;gt;docker/welcome-to-docker&amp;lt;/code&amp;gt; container continues to run until you stop it. You can stop a container using the &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
# Run &amp;lt;code&amp;gt;docker ps&amp;lt;/code&amp;gt; to get the ID of the container&lt;br /&gt;
# Provide the container ID or name to the &amp;lt;code&amp;gt;docker stop&amp;lt;/code&amp;gt; command:  &amp;lt;code&amp;gt;docker stop &amp;lt;the-container-id&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Tip&lt;br /&gt;
When referencing containers by ID, you don&#039;t need to provide the full ID. You only need to provide enough of the ID to make it unique. As an example, the previous container could be stopped by running the following command:&lt;br /&gt;
 &amp;lt;code&amp;gt;docker stop a1f&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E9%96%8B%E6%BA%90%E5%8D%94%E8%AD%B0&amp;diff=145</id>
		<title>基礎原理:開源協議</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E9%96%8B%E6%BA%90%E5%8D%94%E8%AD%B0&amp;diff=145"/>
		<updated>2026-05-06T14:36:44Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​创建页面，内容为“📖 開源協議：數位時代的契約基石  一、 什麼是開源協議？  開源協議是一種法律許可合同。它定義了軟體著作權人與使用者之間的權利與義務。本質上，它並非放棄版權，而是透過預先授權的方式，允許他人進行複製、修改及分發。如果沒有這些協議，根據傳統著作權法，任何未經明確授權的代碼使用皆屬違法，這將極大地阻礙技術協作。  開源協…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;📖 開源協議：數位時代的契約基石&lt;br /&gt;
&lt;br /&gt;
一、 什麼是開源協議？&lt;br /&gt;
&lt;br /&gt;
開源協議是一種法律許可合同。它定義了軟體著作權人與使用者之間的權利與義務。本質上，它並非放棄版權，而是透過預先授權的方式，允許他人進行複製、修改及分發。如果沒有這些協議，根據傳統著作權法，任何未經明確授權的代碼使用皆屬違法，這將極大地阻礙技術協作。&lt;br /&gt;
&lt;br /&gt;
開源協議是基於著作權法（Copyright）的一種預先授權許可。它並非放棄版權，而是版權持有人（Contributor）明確告知公眾：在遵守特定條款的前提下，任何人皆可自由使用、修改及分發該軟體。如果沒有協議，代碼在法律上默認是「保留所有權利」的私有財產。&lt;br /&gt;
&lt;br /&gt;
二、 為什麼會出現開源協議？&lt;br /&gt;
&lt;br /&gt;
在軟體發展早期，代碼通常隨硬體附贈且自由流通。但隨著作權意識抬頭，廠商開始隱藏原始碼以建立商業堡壘。開源協議的出現旨在解決兩大核心問題：&lt;br /&gt;
&lt;br /&gt;
* 消除法律風險：讓開發者在合作時不必逐一簽署授權書。&lt;br /&gt;
* 防止私有化：確保共享的成果不會被第三方惡意佔有或用於法律訴訟，保護開發者的勞動尊嚴。&lt;br /&gt;
* 技術共建需求：解決跨組織、跨國界協作中的法律障礙。&lt;br /&gt;
* 防止公地悲劇：防止個人或企業將社群共創的成果私有化而不回饋。&lt;br /&gt;
* 法律避險：明確條款（如「免責聲明」）保護開發者免受軟體缺陷帶來的連帶法律責任。&lt;br /&gt;
&lt;br /&gt;
三、 歷史起源與演進&lt;br /&gt;
&lt;br /&gt;
* 1970年代：軟體專有化興起，黑客文化受挫。&lt;br /&gt;
* 1980年代（關鍵期）：Richard Stallman 於 1985 年發起自由軟體運動，並於 1989 年撰寫了第一版 GPL (GNU 通用公共授權)，這標誌著現代開源法律框架的誕生。&lt;br /&gt;
* 1990年代至今：隨互聯網爆發，BSD、MIT 等更靈活的協議相繼成熟。1998 年「開源軟體」（Open Source）概念被正式提出，將重點從「自由」轉向「開發效率」。&lt;br /&gt;
* 萌芽期 (1970s)：早期軟體代碼隨硬件附贈，開發者之間自由交換磁帶，存在契約雛形。&lt;br /&gt;
* 法制化 (1980s)：1985 年 Richard Stallman 創立自由軟體基金會（FSF）。1989 年 GPL v1.0 問世，正式確立了「Copyleft」法律概念。&lt;br /&gt;
* 商業化與多樣化 (1990s-2000s)：1998 年「開源」（Open Source）概念提出，強調開發模式的效率。此後 MIT、Apache 等更符合商業利益的協議開始盛行。&lt;br /&gt;
&lt;br /&gt;
四、 主要協議類型與邏輯區分&lt;br /&gt;
&lt;br /&gt;
1. 寬鬆型授權 (Permissive) —— 商業友好&lt;br /&gt;
&lt;br /&gt;
這類協議限制極少，不要求衍生作品開源，是目前最受商業公司歡迎的類型。&lt;br /&gt;
&lt;br /&gt;
* MIT License：極度簡潔，僅要求保留版權聲明。適用於追求最大化傳播的專案。&lt;br /&gt;
* BSD (Berkeley Software Distribution)：分為二句版與三句版。要求保留版權聲明，且禁止利用原作者名義背書。&lt;br /&gt;
* Apache License 2.0：提供明確的專利授權（Patent Grant），若原作者持有相關專利，使用代碼時自動獲得許可，安全性極高。&lt;br /&gt;
&lt;br /&gt;
2. 強傳染型授權 (Strong Copyleft) —— 社群優先&lt;br /&gt;
&lt;br /&gt;
要求任何使用了該代碼的衍生作品，必須以「相同的協議」分發，確保軟體永遠自由。&lt;br /&gt;
&lt;br /&gt;
* GNU GPL (v2/v3)：最強大的保護協議。若你的軟體使用了 GPL 代碼，你的整個專案都必須開源。v3 版增加了反 Tivoization（防止硬體鎖定開源軟體）條款。&lt;br /&gt;
* GNU AGPL (Affero GPL)：補足了雲端漏洞。規定即使不分發安裝包，僅透過網路（SaaS）提供服務，也必須向用戶公開原始碼。&lt;br /&gt;
&lt;br /&gt;
3. 弱傳染型授權 (Weak Copyleft) —— 靈活折衷&lt;br /&gt;
&lt;br /&gt;
介於兩者之間，通常以「模組/檔案」為界限進行約束。&lt;br /&gt;
&lt;br /&gt;
* GNU LGPL：專為函數庫設計。允許閉源程式碼「動態連結」此庫。只有當你修改庫本身時，才需要開源修改部分。&lt;br /&gt;
* MPL (Mozilla Public License)：以「檔案」為單位。修改了受 MPL 保護的文件需開源，但同一專案中其他新增的私有文件可以不開源。&lt;br /&gt;
&lt;br /&gt;
4. 特殊領域授權 (Specialized)&lt;br /&gt;
&lt;br /&gt;
* EPL (Eclipse Public License)：對企業友好，提供專利許可，且允許將開源代碼與私有代碼組合。&lt;br /&gt;
* Unlicense / CC0：放棄所有權利，將作品直接貢獻給公共領域 (Public Domain)。&lt;br /&gt;
&lt;br /&gt;
5. 內容創作專用 (Creative Commons)&lt;br /&gt;
&lt;br /&gt;
雖然主要用於文件、圖片或 Wiki 內容（而非程式碼），但在 MediaWiki 中非常常見。&lt;br /&gt;
&lt;br /&gt;
* CC BY-SA (姓名標示-相同方式分享)：這是 Wikipedia 採用的協議。它要求使用者標明原作者，且修改後的內容必須以同樣的 CC 協議發布。&lt;br /&gt;
&lt;br /&gt;
五、 如何選擇？ (快速指南)&lt;br /&gt;
&lt;br /&gt;
* 如果您希望被廣泛採用且不介意他人閉源：選擇 MIT。&lt;br /&gt;
* 如果您在乎專利保護與企業合規：選擇 Apache 2.0。&lt;br /&gt;
* 如果您希望修改者必須回饋社群：選擇 GPL v3。&lt;br /&gt;
* 如果您開發的是網絡服務後端：選擇 AGPL。&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=144</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=144"/>
		<updated>2026-05-06T14:10:07Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker透過讓開發人員在標準化環境中使用本地容器來執行應用程式與服務，從而簡化開發生命週期。容器非常適合用於持續整合與持續交付（CI/CD）工作流程。&lt;br /&gt;
&lt;br /&gt;
請考慮以下範例情境:&lt;br /&gt;
&lt;br /&gt;
* 您的開發人員在本地編寫程式碼，並透過Docker容器與同事分享工作成果.&lt;br /&gt;
* 他們使用Docker將應用程式部署到測試環境中，並執行自動化與手動測試.&lt;br /&gt;
* 當開發人員發現錯誤時，他們可以在開發環境中進行修正，並將其重新部署至測試環境進行測試與驗證.&lt;br /&gt;
* 測試完成後，只需將更新的映像檔推送至生產環境，即可輕鬆將修正程式交付給客戶.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker基於容器的平台能實現高度可移植的工作負載。Docker容器可在開發者的本地筆記型電腦、資料中心的實體或虛擬機器、雲端服務供應商的環境，或是混合環境中運行.&lt;br /&gt;
&lt;br /&gt;
Docker 的可移植性與輕量級特性，也使其能輕鬆地動態管理工作負載，並能根據業務需求，近乎即時地擴展或終止應用程式與服務。&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker 輕量且快速。它為基於虛擬管理程式的虛擬機器提供了可行且具成本效益的替代方案，讓您能更充分地利用伺服器容量來達成業務目標。Docker 非常適合高密度環境，以及需要以更少的資源完成更多任務的中小型部署。.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker 採用客戶端-伺服器架構。Docker 客戶端與 Docker 守護程式進行通訊，後者負責執行建置、運行及分發 Docker 容器的繁重工作。Docker 客戶端與守護程式可以運行在同一系統上，您也可以將 Docker 客戶端連接到遠端的 Docker 守護程式。Docker 客戶端與守護程式透過 REST API、UNIX 套接字或網路介面進行通訊。另一種 Docker 客戶端是 Docker Compose，它讓您能夠管理由一組容器組成的應用程式.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
Docker的守護進程 (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) 監聽 Docker API 請求，並管理 Docker 物件，例如映像檔、容器、網路和儲存卷。守護程式亦可與其他守護程式通訊，以管理 Docker 服務.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
Docker的客戶端(&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;)這是許多Docker使用者與Docker互動的主要方式.當你使用命令如 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;,客戶端將這些指令傳送至&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;,它負責執行這些命令.該&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;命令使用Docker API跟守護進程通信，Docker客戶端可以與多個守護程式進行通訊。&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop是一款適用於Mac、Windows或Linux環境的易於安裝的應用程式，可讓您建立並分享容器化應用程式與微服務。Docker Desktop內建Docker守護程式 (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;),Docker客戶端(&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;),Docker Compose, Docker Content Trust, Kubernetes, 以及憑證助手。更多詳細的內容請參看Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries(註冊) ===&lt;br /&gt;
Docker registry用於存放Docker鏡像. Docker Hub是一個開放的註冊服務任何人都可以使用,Docker默認在Docker Hub上尋找鏡像.你甚至可以運行自己的私有註冊服務。&lt;br /&gt;
&lt;br /&gt;
當你使用&amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;或&amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;命令, Docker從您配置的註冊機構拉取所需的鏡像。當您使用&amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt;命令,Docker推送您的鏡像到您配置的註冊機構。&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
當你使用Docker,您就會創建並使用鏡像,容器,網絡,卷,插件,和其他的對象。本節將簡要概述其中部分物件。&lt;br /&gt;
&lt;br /&gt;
==== 鏡像(映像檔) ====&lt;br /&gt;
映像檔是一種只讀範本，其中包含建立Docker容器的指示。通常，映像檔是基於另一個映像檔所建構，並進行了一些額外的客製化。例如，您可以建立一個基於 Ubuntu 映像檔的映像檔，其中包含 Apache 網頁伺服器與您的應用程式，以及讓應用程式正常運作所需的配置細節。&lt;br /&gt;
&lt;br /&gt;
您可以自行建立映像檔，也可以僅使用他人建立並發佈至註冊機構中的映像檔。若要建立自己的映像檔，您需撰寫一份 Dockerfile，透過簡單的語法定義建立映像檔及執行所需的步驟。Dockerfile 中的每條指令都會在映像中建立一個層。當您修改 Dockerfile 並重新建立映像時，系統只會重新建立那些已變更的層。這正是映像相較於其他虛擬化技術，之所以如此輕量、小巧且快速的原因之一。&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
容器是映像的可執行實例。您可以透過 Docker API 或 CLI 來建立、啟動、停止、移動或刪除容器。您可以將容器連接到一個或多個網路、為其掛載儲存空間，甚至可以根據其當前狀態建立新的映像。&lt;br /&gt;
&lt;br /&gt;
預設情況下，容器與其他容器及其主機之間的隔離程度相當高。您可以控制容器的網路、儲存或其他底層子系統與其他容器或主機之間的隔離程度。&lt;br /&gt;
&lt;br /&gt;
容器的定義取決於其映像檔，以及您在建立或啟動容器時所提供的任何設定選項。當容器被移除時，任何未儲存於持久儲存裝置中的狀態變更都會消失。&lt;br /&gt;
&lt;br /&gt;
===== 範例 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令 =====&lt;br /&gt;
如下的命令運行一個&amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;容器,並交互式的附加到你的本地命令行會話，並運行&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;命令：&lt;br /&gt;
&amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
執行此指令時，將會發生以下情況(假設您使用的是預設的註冊機構設定):&lt;br /&gt;
&lt;br /&gt;
# 如果您本地沒有&amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;鏡像,Docker從配置的默認註冊機構拉取該鏡像, 就像您手工運行過&amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt;命令一樣。&lt;br /&gt;
# Docker創建一個新容器,就好像您手工運行過&amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt;命令一樣。&lt;br /&gt;
# Docker會為容器分配一個可讀寫的檔案系統，作為其最外層。這使得正在運行的容器能夠在其本機檔案系統中建立或修改檔案與目錄。&lt;br /&gt;
# Docker會建立一個網路介面，將容器連接到預設網路，由於您未指定任何網路選項。這包括為容器指派一個 IP 位址。預設情況下，容器可透過主機的網路連線連接到外部網路。&lt;br /&gt;
# Docker啟動容器並執行&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;。因為該容器是以互動模式執行，並已連接到您的終端會話 (由於使用了 &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; 標記),您可以透過鍵盤輸入指令，同時Docker會將輸出記錄到您的終端會話上。&lt;br /&gt;
# 當您運行&amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;終止該&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;命令,容器將停止運作，但尚未移除。您可以重新啟動它，或將其移除.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker 是以 Go 程式語言編寫的，並利用 Linux 核心的多項功能來實現其運作。Docker 採用了一種稱為 &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; 提供稱為「容器」的隔離工作空間。當您執行一個容器時，Docker會為該容器建立一組命名空間。&lt;br /&gt;
&lt;br /&gt;
這些命名空間提供了一層隔離機制。容器的每個部分都在獨立的名稱空間中運行，且其存取範圍僅限於該名稱空間。&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|Docker引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=143</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=143"/>
		<updated>2026-05-06T14:08:40Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/container|什么是容器]]&lt;br /&gt;
* 什么是镜像&lt;br /&gt;
* 什么是注册机构&lt;br /&gt;
* 什么是Docker Compose&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
* 理解镜像的分层&lt;br /&gt;
* 编写一个Dockerfile&lt;br /&gt;
* 创建，标记，并发布一个镜像&lt;br /&gt;
* 使用创建缓存&lt;br /&gt;
* 多階段建置&lt;br /&gt;
&lt;br /&gt;
运行容器&lt;br /&gt;
* 发布并暴露端口&lt;br /&gt;
* 改写容器默认(配置或参数)&lt;br /&gt;
* 持久化容器数据&lt;br /&gt;
* 与容器分享本地文件&lt;br /&gt;
* 多容器應用程式&lt;br /&gt;
&lt;br /&gt;
[[基礎原理:容器技术/Docker/Engine|返回Docker引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=142</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=142"/>
		<updated>2026-05-06T14:06:47Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* 定義了程式可與Docker守護進程通信及控制的APIs接口.&lt;br /&gt;
* 一个命令行形式交互接口(CLI)的客户端 &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
命令行控制接口(CLI)使用Docker APIs通過編寫腳本或直接輸入命令的方式去控制Docker守護進程及與之交互. 許多其他 Docker 應用程式都使用底層的 API 和 CLI. 該守護程式負責建立和管理Docker物件(對象)，例如映像檔、容器、網路和儲存卷.&lt;br /&gt;
&lt;br /&gt;
更多細節參看[[基礎原理:容器技术/Docker/Architecture|Docker架構]]及[[基礎原理:容器技术/Docker/Concepts|Docker概念]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Install |title=Install Docker Engine |desc=爲您的分發版本安裝Docker引擎.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Storage |title=Storage |desc=在Docker容器中使用持久化數據.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Networking |title=Networking |desc=管理容器之間的網路連線.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Logs |title=Container Logs |desc=瞭解如何檢視和閱讀容器日誌.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Prune |title=Prune |desc=清理未使用的資源.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/daemoncfg |title=Configure the daemon |desc=深入了解 Docker 守護程式的設定選項.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/rootless |title=Rootless mode |desc=以非root權限執行Docker.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/deprecated |title=Deprecated features |desc=了解您應該停止使用Docker Engine的哪些功能.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/release |title=Release notes |desc=最新版本的發行說明.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=141</id>
		<title>基礎原理:容器技术/Docker/Concepts/container</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts/container&amp;diff=141"/>
		<updated>2026-05-06T13:59:33Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​创建页面，内容为“== Explanation == Imagine you&amp;#039;re developing a killer web app that has three main components - a React frontend, a Python API, and a PostgreSQL database. If you wanted to work on this project, you&amp;#039;d have to install Node, Python, and PostgreSQL.  How do you make sure you have the same versions as the other developers on your team? Or your CI/CD system? Or what&amp;#039;s used in production?  How do you ensure the version of Python (or Node or the database) your app needs…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Explanation ==&lt;br /&gt;
Imagine you&#039;re developing a killer web app that has three main components - a React frontend, a Python API, and a PostgreSQL database. If you wanted to work on this project, you&#039;d have to install Node, Python, and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
How do you make sure you have the same versions as the other developers on your team? Or your CI/CD system? Or what&#039;s used in production?&lt;br /&gt;
&lt;br /&gt;
How do you ensure the version of Python (or Node or the database) your app needs isn&#039;t affected by what&#039;s already on your machine? How do you manage potential conflicts?&lt;br /&gt;
&lt;br /&gt;
Enter containers!&lt;br /&gt;
&lt;br /&gt;
What is a container? Simply put, containers are isolated processes for each of your app&#039;s components. Each component - the frontend React app, the Python API engine, and the database - runs in its own isolated environment, completely isolated from everything else on your machine.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s what makes them awesome. Containers are:&lt;br /&gt;
&lt;br /&gt;
* Self-contained. Each container has everything it needs to function with no reliance on any pre-installed dependencies on the host machine.&lt;br /&gt;
* Isolated. Since containers run in isolation, they have minimal influence on the host and other containers, increasing the security of your applications.&lt;br /&gt;
* Independent. Each container is independently managed. Deleting one container won&#039;t affect any others.&lt;br /&gt;
* Portable. Containers can run anywhere! The container that runs on your development machine will work the same way in a data center or anywhere in the cloud!&lt;br /&gt;
&lt;br /&gt;
=== Containers versus virtual machines (VMs) ===&lt;br /&gt;
Without getting too deep, a VM is an entire operating system with its own kernel, hardware drivers, programs, and applications. Spinning up a VM only to isolate a single application is a lot of overhead.&lt;br /&gt;
&lt;br /&gt;
A container is simply an isolated process with all of the files it needs to run. If you run multiple containers, they all share the same kernel, allowing you to run more applications on less infrastructure.&amp;lt;blockquote&amp;gt;&#039;&#039;&#039;Using VMs and containers together&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Quite often, you will see containers and VMs used together. As an example, in a cloud environment, the provisioned machines are typically VMs. However, instead of provisioning one machine to run one application, a VM with a container runtime can run multiple containerized applications, increasing resource utilization and reducing costs.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Try it out ==&lt;br /&gt;
In this hands-on, you will see how to run a Docker container using the Docker Desktop GUI.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=140</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=140"/>
		<updated>2026-05-06T13:53:15Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Concepts/container|什么是容器]]&lt;br /&gt;
* 什么是镜像&lt;br /&gt;
* 什么是注册机构&lt;br /&gt;
* 什么是Docker Compose&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
* 理解镜像的分层&lt;br /&gt;
* 编写一个Dockerfile&lt;br /&gt;
* 创建，标记，并发布一个镜像&lt;br /&gt;
* 使用创建缓存&lt;br /&gt;
* 多階段建置&lt;br /&gt;
&lt;br /&gt;
运行容器&lt;br /&gt;
* 发布并暴露端口&lt;br /&gt;
* 改写容器默认(配置或参数)&lt;br /&gt;
* 持久化容器数据&lt;br /&gt;
* 与容器分享本地文件&lt;br /&gt;
* 多容器應用程式&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=139</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=139"/>
		<updated>2026-05-06T13:45:13Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* 什么是容器&lt;br /&gt;
* 什么是镜像&lt;br /&gt;
* 什么是注册机构&lt;br /&gt;
* 什么是Docker Compose&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
* 理解镜像的分层&lt;br /&gt;
* 编写一个Dockerfile&lt;br /&gt;
* 创建，标记，并发布一个镜像&lt;br /&gt;
* 使用创建缓存&lt;br /&gt;
* 多階段建置&lt;br /&gt;
&lt;br /&gt;
运行容器&lt;br /&gt;
* 发布并暴露端口&lt;br /&gt;
* 改写容器默认(配置或参数)&lt;br /&gt;
* 持久化容器数据&lt;br /&gt;
* 与容器分享本地文件&lt;br /&gt;
* 多容器應用程式&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=138</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=138"/>
		<updated>2026-05-06T13:38:13Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* 什么是容器&lt;br /&gt;
* 什么是镜像&lt;br /&gt;
* 什么是注册机构&lt;br /&gt;
* 什么是Docker Compose&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
&lt;br /&gt;
运行容器&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=137</id>
		<title>基礎原理:容器技术/Docker/Concepts</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Concepts&amp;diff=137"/>
		<updated>2026-05-06T13:37:55Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​创建页面，内容为“基础概念 * 什么是容器 * 什么是镜像 * 什么是注册机构 * 什么是Docker Compose  创建镜像 运行容器”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;基础概念&lt;br /&gt;
* 什么是容器&lt;br /&gt;
* 什么是镜像&lt;br /&gt;
* 什么是注册机构&lt;br /&gt;
* 什么是Docker Compose&lt;br /&gt;
&lt;br /&gt;
创建镜像&lt;br /&gt;
运行容器&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=136</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=136"/>
		<updated>2026-05-06T13:26:31Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker透過讓開發人員在標準化環境中使用本地容器來執行應用程式與服務，從而簡化開發生命週期。容器非常適合用於持續整合與持續交付（CI/CD）工作流程。&lt;br /&gt;
&lt;br /&gt;
請考慮以下範例情境:&lt;br /&gt;
&lt;br /&gt;
* 您的開發人員在本地編寫程式碼，並透過Docker容器與同事分享工作成果.&lt;br /&gt;
* 他們使用Docker將應用程式部署到測試環境中，並執行自動化與手動測試.&lt;br /&gt;
* 當開發人員發現錯誤時，他們可以在開發環境中進行修正，並將其重新部署至測試環境進行測試與驗證.&lt;br /&gt;
* 測試完成後，只需將更新的映像檔推送至生產環境，即可輕鬆將修正程式交付給客戶.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker基於容器的平台能實現高度可移植的工作負載。Docker容器可在開發者的本地筆記型電腦、資料中心的實體或虛擬機器、雲端服務供應商的環境，或是混合環境中運行.&lt;br /&gt;
&lt;br /&gt;
Docker 的可移植性與輕量級特性，也使其能輕鬆地動態管理工作負載，並能根據業務需求，近乎即時地擴展或終止應用程式與服務。&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker 輕量且快速。它為基於虛擬管理程式的虛擬機器提供了可行且具成本效益的替代方案，讓您能更充分地利用伺服器容量來達成業務目標。Docker 非常適合高密度環境，以及需要以更少的資源完成更多任務的中小型部署。.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker 採用客戶端-伺服器架構。Docker 客戶端與 Docker 守護程式進行通訊，後者負責執行建置、運行及分發 Docker 容器的繁重工作。Docker 客戶端與守護程式可以運行在同一系統上，您也可以將 Docker 客戶端連接到遠端的 Docker 守護程式。Docker 客戶端與守護程式透過 REST API、UNIX 套接字或網路介面進行通訊。另一種 Docker 客戶端是 Docker Compose，它讓您能夠管理由一組容器組成的應用程式.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
Docker的守護進程 (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) 監聽 Docker API 請求，並管理 Docker 物件，例如映像檔、容器、網路和儲存卷。守護程式亦可與其他守護程式通訊，以管理 Docker 服務.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
Docker的客戶端(&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;)這是許多Docker使用者與Docker互動的主要方式.當你使用命令如 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;,客戶端將這些指令傳送至&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;,它負責執行這些命令.該&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;命令使用Docker API跟守護進程通信，Docker客戶端可以與多個守護程式進行通訊。&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop是一款適用於Mac、Windows或Linux環境的易於安裝的應用程式，可讓您建立並分享容器化應用程式與微服務。Docker Desktop內建Docker守護程式 (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;),Docker客戶端(&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;),Docker Compose, Docker Content Trust, Kubernetes, 以及憑證助手。更多詳細的內容請參看Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries(註冊) ===&lt;br /&gt;
Docker registry用於存放Docker鏡像. Docker Hub是一個開放的註冊服務任何人都可以使用,Docker默認在Docker Hub上尋找鏡像.你甚至可以運行自己的私有註冊服務。&lt;br /&gt;
&lt;br /&gt;
當你使用&amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt;或&amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;命令, Docker從您配置的註冊機構拉取所需的鏡像。當您使用&amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt;命令,Docker推送您的鏡像到您配置的註冊機構。&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
當你使用Docker,您就會創建並使用鏡像,容器,網絡,卷,插件,和其他的對象。本節將簡要概述其中部分物件。&lt;br /&gt;
&lt;br /&gt;
==== 鏡像(映像檔) ====&lt;br /&gt;
映像檔是一種只讀範本，其中包含建立Docker容器的指示。通常，映像檔是基於另一個映像檔所建構，並進行了一些額外的客製化。例如，您可以建立一個基於 Ubuntu 映像檔的映像檔，其中包含 Apache 網頁伺服器與您的應用程式，以及讓應用程式正常運作所需的配置細節。&lt;br /&gt;
&lt;br /&gt;
您可以自行建立映像檔，也可以僅使用他人建立並發佈至註冊機構中的映像檔。若要建立自己的映像檔，您需撰寫一份 Dockerfile，透過簡單的語法定義建立映像檔及執行所需的步驟。Dockerfile 中的每條指令都會在映像中建立一個層。當您修改 Dockerfile 並重新建立映像時，系統只會重新建立那些已變更的層。這正是映像相較於其他虛擬化技術，之所以如此輕量、小巧且快速的原因之一。&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
容器是映像的可執行實例。您可以透過 Docker API 或 CLI 來建立、啟動、停止、移動或刪除容器。您可以將容器連接到一個或多個網路、為其掛載儲存空間，甚至可以根據其當前狀態建立新的映像。&lt;br /&gt;
&lt;br /&gt;
預設情況下，容器與其他容器及其主機之間的隔離程度相當高。您可以控制容器的網路、儲存或其他底層子系統與其他容器或主機之間的隔離程度。&lt;br /&gt;
&lt;br /&gt;
容器的定義取決於其映像檔，以及您在建立或啟動容器時所提供的任何設定選項。當容器被移除時，任何未儲存於持久儲存裝置中的狀態變更都會消失。&lt;br /&gt;
&lt;br /&gt;
===== 範例 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; 命令 =====&lt;br /&gt;
如下的命令運行一個&amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;容器,並交互式的附加到你的本地命令行會話，並運行&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;命令：&lt;br /&gt;
&amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
執行此指令時，將會發生以下情況(假設您使用的是預設的註冊機構設定):&lt;br /&gt;
&lt;br /&gt;
# 如果您本地沒有&amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt;鏡像,Docker從配置的默認註冊機構拉取該鏡像, 就像您手工運行過&amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt;命令一樣。&lt;br /&gt;
# Docker創建一個新容器,就好像您手工運行過&amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt;命令一樣。&lt;br /&gt;
# Docker會為容器分配一個可讀寫的檔案系統，作為其最外層。這使得正在運行的容器能夠在其本機檔案系統中建立或修改檔案與目錄。&lt;br /&gt;
# Docker會建立一個網路介面，將容器連接到預設網路，由於您未指定任何網路選項。這包括為容器指派一個 IP 位址。預設情況下，容器可透過主機的網路連線連接到外部網路。&lt;br /&gt;
# Docker啟動容器並執行&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;。因為該容器是以互動模式執行，並已連接到您的終端會話 (由於使用了 &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; 和 &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; 標記),您可以透過鍵盤輸入指令，同時Docker會將輸出記錄到您的終端會話上。&lt;br /&gt;
# 當您運行&amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt;終止該&amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;命令,容器將停止運作，但尚未移除。您可以重新啟動它，或將其移除.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker 是以 Go 程式語言編寫的，並利用 Linux 核心的多項功能來實現其運作。Docker 採用了一種稱為 &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; 提供稱為「容器」的隔離工作空間。當您執行一個容器時，Docker會為該容器建立一組命名空間。&lt;br /&gt;
&lt;br /&gt;
這些命名空間提供了一層隔離機制。容器的每個部分都在獨立的名稱空間中運行，且其存取範圍僅限於該名稱空間。&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=135</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=135"/>
		<updated>2026-05-06T12:25:31Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker透過讓開發人員在標準化環境中使用本地容器來執行應用程式與服務，從而簡化開發生命週期。容器非常適合用於持續整合與持續交付（CI/CD）工作流程。&lt;br /&gt;
&lt;br /&gt;
請考慮以下範例情境:&lt;br /&gt;
&lt;br /&gt;
* 您的開發人員在本地編寫程式碼，並透過Docker容器與同事分享工作成果.&lt;br /&gt;
* 他們使用Docker將應用程式部署到測試環境中，並執行自動化與手動測試.&lt;br /&gt;
* 當開發人員發現錯誤時，他們可以在開發環境中進行修正，並將其重新部署至測試環境進行測試與驗證.&lt;br /&gt;
* 測試完成後，只需將更新的映像檔推送至生產環境，即可輕鬆將修正程式交付給客戶.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker基於容器的平台能實現高度可移植的工作負載。Docker容器可在開發者的本地筆記型電腦、資料中心的實體或虛擬機器、雲端服務供應商的環境，或是混合環境中運行.&lt;br /&gt;
&lt;br /&gt;
Docker 的可移植性與輕量級特性，也使其能輕鬆地動態管理工作負載，並能根據業務需求，近乎即時地擴展或終止應用程式與服務。&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker 輕量且快速。它為基於虛擬管理程式的虛擬機器提供了可行且具成本效益的替代方案，讓您能更充分地利用伺服器容量來達成業務目標。Docker 非常適合高密度環境，以及需要以更少的資源完成更多任務的中小型部署。.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker 採用客戶端-伺服器架構。Docker 客戶端與 Docker 守護程式進行通訊，後者負責執行建置、運行及分發 Docker 容器的繁重工作。Docker 客戶端與守護程式可以運行在同一系統上，您也可以將 Docker 客戶端連接到遠端的 Docker 守護程式。Docker 客戶端與守護程式透過 REST API、UNIX 套接字或網路介面進行通訊。另一種 Docker 客戶端是 Docker Compose，它讓您能夠管理由一組容器組成的應用程式.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
Docker的守護進程 (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) 監聽 Docker API 請求，並管理 Docker 物件，例如映像檔、容器、網路和儲存卷。守護程式亦可與其他守護程式通訊，以管理 Docker 服務.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
Docker的客戶端(&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;)這是許多Docker使用者與Docker互動的主要方式.當你使用命令如 &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;,客戶端將這些指令傳送至&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;,它負責執行這些命令.該&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;命令使用Docker API跟守護進程通信，Docker客戶端可以與多個守護程式進行通訊。&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=134</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=134"/>
		<updated>2026-05-05T15:49:40Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker透過讓開發人員在標準化環境中使用本地容器來執行應用程式與服務，從而簡化開發生命週期。容器非常適合用於持續整合與持續交付（CI/CD）工作流程。&lt;br /&gt;
&lt;br /&gt;
請考慮以下範例情境:&lt;br /&gt;
&lt;br /&gt;
* 您的開發人員在本地編寫程式碼，並透過Docker容器與同事分享工作成果.&lt;br /&gt;
* 他們使用Docker將應用程式部署到測試環境中，並執行自動化與手動測試.&lt;br /&gt;
* 當開發人員發現錯誤時，他們可以在開發環境中進行修正，並將其重新部署至測試環境進行測試與驗證.&lt;br /&gt;
* 測試完成後，只需將更新的映像檔推送至生產環境，即可輕鬆將修正程式交付給客戶.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker基於容器的平台能實現高度可移植的工作負載。Docker容器可在開發者的本地筆記型電腦、資料中心的實體或虛擬機器、雲端服務供應商的環境，或是混合環境中運行.&lt;br /&gt;
&lt;br /&gt;
Docker 的可移植性與輕量級特性，也使其能輕鬆地動態管理工作負載，並能根據業務需求，近乎即時地擴展或終止應用程式與服務。&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker 輕量且快速。它為基於虛擬管理程式的虛擬機器提供了可行且具成本效益的替代方案，讓您能更充分地利用伺服器容量來達成業務目標。Docker 非常適合高密度環境，以及需要以更少的資源完成更多任務的中小型部署。.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker 採用客戶端-伺服器架構。Docker 客戶端與 Docker 守護程式進行通訊，後者負責執行建置、運行及分發 Docker 容器的繁重工作。Docker 客戶端與守護程式可以運行在同一系統上，您也可以將 Docker 客戶端連接到遠端的 Docker 守護程式。Docker 客戶端與守護程式透過 REST API、UNIX 套接字或網路介面進行通訊。另一種 Docker 客戶端是 Docker Compose，它讓您能夠管理由一組容器組成的應用程式.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=133</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=133"/>
		<updated>2026-05-05T11:25:22Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker透過讓開發人員在標準化環境中使用本地容器來執行應用程式與服務，從而簡化開發生命週期。容器非常適合用於持續整合與持續交付（CI/CD）工作流程。&lt;br /&gt;
&lt;br /&gt;
請考慮以下範例情境:&lt;br /&gt;
&lt;br /&gt;
* 您的開發人員在本地編寫程式碼，並透過Docker容器與同事分享工作成果.&lt;br /&gt;
* 他們使用Docker將應用程式部署到測試環境中，並執行自動化與手動測試.&lt;br /&gt;
* 當開發人員發現錯誤時，他們可以在開發環境中進行修正，並將其重新部署至測試環境進行測試與驗證.&lt;br /&gt;
* 測試完成後，只需將更新的映像檔推送至生產環境，即可輕鬆將修正程式交付給客戶.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=132</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=132"/>
		<updated>2026-05-05T11:00:09Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=131</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=131"/>
		<updated>2026-05-05T10:59:35Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個基本分離的被稱爲容器的環境進行打包和運行應用程式的能力。這種隔離及安全性可以讓你在同一臺主機上同時運行多個容器。容器是輕量的，並具備運行應用所需的所有依賴，因此，您無需依賴主機上已安裝的軟體。您可以在工作時分享容器，並確保所有接收者都能獲得運作方式完全相同的容器。&lt;br /&gt;
&lt;br /&gt;
Docker 提供了一套工具和平台，用於管理容器的生命週期:&lt;br /&gt;
&lt;br /&gt;
* 使用容器開發您的應用程式及其相關元件&lt;br /&gt;
* 容器成為部署和測試您應用程式的基本單位&lt;br /&gt;
* 準備就緒後，請將您的應用程式部署至生產環境，形式可以是容器或經協調的服務. 無論您的生產環境是本地資料中心、雲端服務供應商，還是兩者的混合部署，此方法皆適用.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=MediaWiki:Common.js&amp;diff=130</id>
		<title>MediaWiki:Common.js</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=MediaWiki:Common.js&amp;diff=130"/>
		<updated>2026-05-05T10:12:36Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */&lt;br /&gt;
/*&lt;br /&gt;
$(function() {&lt;br /&gt;
    // 檢查是否為 Timeless 面板且存在目錄和右側欄&lt;br /&gt;
    var $toc = $(&#039;#toc&#039;);&lt;br /&gt;
    var $rightColumn = $(&#039;#mw-related-navigation&#039;);&lt;br /&gt;
&lt;br /&gt;
    if ($toc.length &amp;amp;&amp;amp; $rightColumn.length) {&lt;br /&gt;
        // 建立一個符合 Timeless 風格的包裝層&lt;br /&gt;
        var $tocWrapper = $(&#039;&amp;lt;div id=&amp;quot;p-toc-sidebar&amp;quot; class=&amp;quot;sidebar-chunk&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;);&lt;br /&gt;
        var $tocTitle = $(&#039;&amp;lt;h3&amp;gt;&#039;).text($toc.find(&#039;.toctitle h2&#039;).text() || &#039;目錄&#039;);&lt;br /&gt;
        var $tocInner = $(&#039;&amp;lt;div class=&amp;quot;sidebar-inner&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&#039;);&lt;br /&gt;
&lt;br /&gt;
        // 搬移目錄內容&lt;br /&gt;
        $tocInner.append($toc.find(&#039;ul&#039;));&lt;br /&gt;
        $tocWrapper.append($tocTitle).append($tocInner);&lt;br /&gt;
&lt;br /&gt;
        // 插入到右側欄的最頂端&lt;br /&gt;
        $rightColumn.prepend($tocWrapper);&lt;br /&gt;
&lt;br /&gt;
        // 隱藏原本在文章頭部的目錄&lt;br /&gt;
        $toc.remove();&lt;br /&gt;
    }&lt;br /&gt;
});&lt;br /&gt;
*/&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=129</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=129"/>
		<updated>2026-05-05T10:09:44Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個大概分離的被稱爲容器的環境打包和運行應用程式的能力&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
&lt;br /&gt;
=== 快速且穩定地交付您的應用程式 ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== 響應式部署與擴展 ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== 在相同的硬件上運行更多的工作載荷 ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker 架構 ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== Docker 守護進程(daemon) ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== Docker 客戶端 ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker 桌面版 ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker 對象 ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== 鏡像 ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== 容器 ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== 底層技術 ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=128</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=128"/>
		<updated>2026-05-05T05:32:18Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker是一個開發、交付、運行程序的開放的平臺。Docker讓你可以從你的架構中將你的應用分隔(分離)開,讓你可以快速的進行交付。通過Docker,您可以用您平時管理單個應用相同的方式管理您的整個架構。透過運用Docker在程式碼發布、測試及部署方面的方法論，您可以大幅縮短從編寫程式碼到在生產環境中執行之間的延遲。&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker提供在一個大概分離的被稱爲容器的環境打包和運行應用程式的能力&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=127</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=127"/>
		<updated>2026-05-04T17:07:43Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​/* What is Docker? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= 什麼是Docker？=&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== Docker 平臺 ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== Docker可以用於做什麼？ ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=126</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=126"/>
		<updated>2026-05-04T17:00:28Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回：[[基礎原理:容器技术/Docker/Engine|容器引擎]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=125</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=125"/>
		<updated>2026-05-04T16:59:20Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;br /&gt;
&lt;br /&gt;
返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=124</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=124"/>
		<updated>2026-05-04T16:55:55Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|819x819px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=123</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=123"/>
		<updated>2026-05-04T16:55:20Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​/* The Docker daemon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|838x838px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=122</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=122"/>
		<updated>2026-05-04T16:55:00Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|814x814px|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=121</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=121"/>
		<updated>2026-05-04T16:54:13Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
[[文件:Docker-architecture.png|缩略图|810x810像素|docker架構]]&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E6%96%87%E4%BB%B6:Docker-architecture.png&amp;diff=120</id>
		<title>文件:Docker-architecture.png</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E6%96%87%E4%BB%B6:Docker-architecture.png&amp;diff=120"/>
		<updated>2026-05-04T16:53:09Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;docker-architecture&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=119</id>
		<title>基礎原理:容器技术/Docker/Architecture</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Architecture&amp;diff=119"/>
		<updated>2026-05-04T16:47:49Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​创建页面，内容为“= What is Docker? = Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&amp;#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running…”&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What is Docker? =&lt;br /&gt;
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking advantage of Docker&#039;s methodologies for shipping, testing, and deploying code, you can significantly reduce the delay between writing code and running it in production.&lt;br /&gt;
&lt;br /&gt;
== The Docker platform ==&lt;br /&gt;
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security let you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don&#039;t need to rely on what&#039;s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.&lt;br /&gt;
&lt;br /&gt;
Docker provides tooling and a platform to manage the lifecycle of your containers:&lt;br /&gt;
&lt;br /&gt;
* Develop your application and its supporting components using containers.&lt;br /&gt;
* The container becomes the unit for distributing and testing your application.&lt;br /&gt;
* When you&#039;re ready, deploy your application into your production environment, as a container or an orchestrated service. This works the same whether your production environment is a local data center, a cloud provider, or a hybrid of the two.&lt;br /&gt;
&lt;br /&gt;
== What can I use Docker for? ==&lt;br /&gt;
&lt;br /&gt;
=== Fast, consistent delivery of your applications ===&lt;br /&gt;
Docker streamlines the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services. Containers are great for continuous integration and continuous delivery (CI/CD) workflows.&lt;br /&gt;
&lt;br /&gt;
Consider the following example scenario:&lt;br /&gt;
&lt;br /&gt;
* Your developers write code locally and share their work with their colleagues using Docker containers.&lt;br /&gt;
* They use Docker to push their applications into a test environment and run automated and manual tests.&lt;br /&gt;
* When developers find bugs, they can fix them in the development environment and redeploy them to the test environment for testing and validation.&lt;br /&gt;
* When testing is complete, getting the fix to the customer is as simple as pushing the updated image to the production environment.&lt;br /&gt;
&lt;br /&gt;
=== Responsive deployment and scaling ===&lt;br /&gt;
Docker&#039;s container-based platform allows for highly portable workloads. Docker containers can run on a developer&#039;s local laptop, on physical or virtual machines in a data center, on cloud providers, or in a mixture of environments.&lt;br /&gt;
&lt;br /&gt;
Docker&#039;s portability and lightweight nature also make it easy to dynamically manage workloads, scaling up or tearing down applications and services as business needs dictate, in near real time.&lt;br /&gt;
&lt;br /&gt;
=== Running more workloads on the same hardware ===&lt;br /&gt;
Docker is lightweight and fast. It provides a viable, cost-effective alternative to hypervisor-based virtual machines, so you can use more of your server capacity to achieve your business goals. Docker is perfect for high density environments and for small and medium deployments where you need to do more with fewer resources.&lt;br /&gt;
&lt;br /&gt;
== Docker architecture ==&lt;br /&gt;
Docker uses a client-server architecture. The Docker client talks to the Docker daemon, which does the heavy lifting of building, running, and distributing your Docker containers. The Docker client and daemon can run on the same system, or you can connect a Docker client to a remote Docker daemon. The Docker client and daemon communicate using a REST API, over UNIX sockets or a network interface. Another Docker client is Docker Compose, that lets you work with applications consisting of a set of containers.&lt;br /&gt;
&lt;br /&gt;
=== The Docker daemon ===&lt;br /&gt;
The Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;) listens for Docker API requests and manages Docker objects such as images, containers, networks, and volumes. A daemon can also communicate with other daemons to manage Docker services.&lt;br /&gt;
&lt;br /&gt;
=== The Docker client ===&lt;br /&gt;
The Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;) is the primary way that many Docker users interact with Docker. When you use commands such as &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt;, the client sends these commands to &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;, which carries them out. The &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt; command uses the Docker API. The Docker client can communicate with more than one daemon.&lt;br /&gt;
&lt;br /&gt;
=== Docker Desktop ===&lt;br /&gt;
Docker Desktop is an easy-to-install application for your Mac, Windows, or Linux environment that enables you to build and share containerized applications and microservices. Docker Desktop includes the Docker daemon (&amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;), the Docker client (&amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;), Docker Compose, Docker Content Trust, Kubernetes, and Credential Helper. For more information, see Docker Desktop.&lt;br /&gt;
&lt;br /&gt;
=== Docker registries ===&lt;br /&gt;
A Docker registry stores Docker images. Docker Hub is a public registry that anyone can use, and Docker looks for images on Docker Hub by default. You can even run your own private registry.&lt;br /&gt;
&lt;br /&gt;
When you use the &amp;lt;code&amp;gt;docker pull&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands, Docker pulls the required images from your configured registry. When you use the &amp;lt;code&amp;gt;docker push&amp;lt;/code&amp;gt; command, Docker pushes your image to your configured registry.&lt;br /&gt;
&lt;br /&gt;
=== Docker objects ===&lt;br /&gt;
When you use Docker, you are creating and using images, containers, networks, volumes, plugins, and other objects. This section is a brief overview of some of those objects.&lt;br /&gt;
&lt;br /&gt;
==== Images ====&lt;br /&gt;
An image is a read-only template with instructions for creating a Docker container. Often, an image is based on another image, with some additional customization. For example, you may build an image that is based on the Ubuntu image but includes the Apache web server and your application, as well as the configuration details needed to make your application run.&lt;br /&gt;
&lt;br /&gt;
You might create your own images or you might only use those created by others and published in a registry. To build your own image, you create a Dockerfile with a simple syntax for defining the steps needed to create the image and run it. Each instruction in a Dockerfile creates a layer in the image. When you change the Dockerfile and rebuild the image, only those layers which have changed are rebuilt. This is part of what makes images so lightweight, small, and fast, when compared to other virtualization technologies.&lt;br /&gt;
&lt;br /&gt;
==== Containers ====&lt;br /&gt;
A container is a runnable instance of an image. You can create, start, stop, move, or delete a container using the Docker API or CLI. You can connect a container to one or more networks, attach storage to it, or even create a new image based on its current state.&lt;br /&gt;
&lt;br /&gt;
By default, a container is relatively well isolated from other containers and its host machine. You can control how isolated a container&#039;s network, storage, or other underlying subsystems are from other containers or from the host machine.&lt;br /&gt;
&lt;br /&gt;
A container is defined by its image as well as any configuration options you provide to it when you create or start it. When a container is removed, any changes to its state that aren&#039;t stored in persistent storage disappear.&lt;br /&gt;
&lt;br /&gt;
===== Example &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command =====&lt;br /&gt;
The following command runs an &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; container, attaches interactively to your local command-line session, and runs &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
  &amp;lt;code&amp;gt;docker run -i -t ubuntu /bin/bash&amp;lt;/code&amp;gt;&lt;br /&gt;
When you run this command, the following happens (assuming you are using the default registry configuration):&lt;br /&gt;
&lt;br /&gt;
# If you don&#039;t have the &amp;lt;code&amp;gt;ubuntu&amp;lt;/code&amp;gt; image locally, Docker pulls it from your configured registry, as though you had run &amp;lt;code&amp;gt;docker pull ubuntu&amp;lt;/code&amp;gt; manually.&lt;br /&gt;
# Docker creates a new container, as though you had run a &amp;lt;code&amp;gt;docker container create&amp;lt;/code&amp;gt; command manually.&lt;br /&gt;
# Docker allocates a read-write filesystem to the container, as its final layer. This allows a running container to create or modify files and directories in its local filesystem.&lt;br /&gt;
# Docker creates a network interface to connect the container to the default network, since you didn&#039;t specify any networking options. This includes assigning an IP address to the container. By default, containers can connect to external networks using the host machine&#039;s network connection.&lt;br /&gt;
# Docker starts the container and executes &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt;. Because the container is running interactively and attached to your terminal (due to the &amp;lt;code&amp;gt;-i&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-t&amp;lt;/code&amp;gt; flags), you can provide input using your keyboard while Docker logs the output to your terminal.&lt;br /&gt;
# When you run &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; to terminate the &amp;lt;code&amp;gt;/bin/bash&amp;lt;/code&amp;gt; command, the container stops but isn&#039;t removed. You can start it again or remove it.&lt;br /&gt;
&lt;br /&gt;
== The underlying technology ==&lt;br /&gt;
Docker is written in the Go programming language and takes advantage of several features of the Linux kernel to deliver its functionality. Docker uses a technology called &amp;lt;code&amp;gt;namespaces&amp;lt;/code&amp;gt; to provide the isolated workspace called the container. When you run a container, Docker creates a set of namespaces for that container.&lt;br /&gt;
&lt;br /&gt;
These namespaces provide a layer of isolation. Each aspect of a container runs in a separate namespace and its access is limited to that namespace.&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=117</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=117"/>
		<updated>2026-05-04T16:42:41Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* 定義了程式可與Docker守護進程通信及控制的APIs接口.&lt;br /&gt;
* 一个命令行形式交互接口(CLI)的客户端 &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
命令行控制接口(CLI)使用Docker APIs通過編寫腳本或直接輸入命令的方式去控制Docker守護進程及與之交互. 許多其他 Docker 應用程式都使用底層的 API 和 CLI. 該守護程式負責建立和管理Docker物件(對象)，例如映像檔、容器、網路和儲存卷.&lt;br /&gt;
&lt;br /&gt;
更多細節參看[[基礎原理:容器技术/Docker/Architecture|Docker架構]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Install |title=Install Docker Engine |desc=爲您的分發版本安裝Docker引擎.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Storage |title=Storage |desc=在Docker容器中使用持久化數據.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Networking |title=Networking |desc=管理容器之間的網路連線.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Logs |title=Container Logs |desc=瞭解如何檢視和閱讀容器日誌.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Prune |title=Prune |desc=清理未使用的資源.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/daemoncfg |title=Configure the daemon |desc=深入了解 Docker 守護程式的設定選項.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/rootless |title=Rootless mode |desc=以非root權限執行Docker.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/deprecated |title=Deprecated features |desc=了解您應該停止使用Docker Engine的哪些功能.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/release |title=Release notes |desc=最新版本的發行說明.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=116</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=116"/>
		<updated>2026-05-04T16:35:15Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* 定義了程式可與Docker守護進程通信及控制的APIs接口.&lt;br /&gt;
* 一个命令行形式交互接口(CLI)的客户端 &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
命令行控制接口(CLI)使用Docker APIs通過編寫腳本或直接輸入命令的方式去控制Docker守護進程及與之交互. 許多其他 Docker 應用程式都使用底層的 API 和 CLI. 該守護程式負責建立和管理Docker物件(對象)，例如映像檔、容器、網路和儲存卷.&lt;br /&gt;
&lt;br /&gt;
更多細節參看 Docker Architecture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Install |title=Install Docker Engine |desc=爲您的分發版本安裝Docker引擎.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Storage |title=Storage |desc=在Docker容器中使用持久化數據.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Networking |title=Networking |desc=管理容器之間的網路連線.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Logs |title=Container Logs |desc=瞭解如何檢視和閱讀容器日誌.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Prune |title=Prune |desc=清理未使用的資源.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/daemoncfg |title=Configure the daemon |desc=深入了解 Docker 守護程式的設定選項.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/rootless |title=Rootless mode |desc=以非root權限執行Docker.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/deprecated |title=Deprecated features |desc=了解您應該停止使用Docker Engine的哪些功能.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/release |title=Release notes |desc=最新版本的發行說明.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=115</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=115"/>
		<updated>2026-05-04T16:16:21Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon.&lt;br /&gt;
* A command line interface (CLI) client &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The CLI uses Docker APIs to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI. The daemon creates and manages Docker objects, such as images, containers, networks, and volumes.&lt;br /&gt;
&lt;br /&gt;
For more details, see Docker Architecture.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Install |title=Install Docker Engine |desc=爲您的分發版本安裝Docker引擎.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Storage |title=Storage |desc=在Docker容器中使用持久化數據.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Networking |title=Networking |desc=管理容器之間的網路連線.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Logs |title=Container Logs |desc=瞭解如何檢視和閱讀容器日誌.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Prune |title=Prune |desc=清理未使用的資源.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/daemoncfg |title=Configure the daemon |desc=深入了解 Docker 守護程式的設定選項.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/rootless |title=Rootless mode |desc=以非root權限執行Docker.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/deprecated |title=Deprecated features |desc=了解您應該停止使用Docker Engine的哪些功能.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/release |title=Release notes |desc=最新版本的發行說明.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=114</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=114"/>
		<updated>2026-05-04T16:14:34Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon.&lt;br /&gt;
* A command line interface (CLI) client &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The CLI uses Docker APIs to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI. The daemon creates and manages Docker objects, such as images, containers, networks, and volumes.&lt;br /&gt;
&lt;br /&gt;
For more details, see Docker Architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Open source ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Install |title=Install Docker Engine |desc=爲您的分發版本安裝Docker引擎.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Storage |title=Storage |desc=在Docker容器中使用持久化數據.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Networking |title=Networking |desc=管理容器之間的網路連線.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Logs |title=Container Logs |desc=瞭解如何檢視和閱讀容器日誌.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/Prune |title=Prune |desc=清理未使用的資源.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/daemoncfg |title=Configure the daemon |desc=深入了解 Docker 守護程式的設定選項.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/rootless |title=Rootless mode |desc=以非root權限執行Docker.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/deprecated |title=Deprecated features |desc=了解您應該停止使用Docker Engine的哪些功能.}}&lt;br /&gt;
{{NavBox |link=基礎原理:容器技术/Docker/Engine/release |title=Release notes |desc=最新版本的發行說明.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=113</id>
		<title>基礎原理:容器技术/Docker/Engine</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker/Engine&amp;diff=113"/>
		<updated>2026-05-04T15:56:51Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Docker Engine =&lt;br /&gt;
Docker Engine （Docker引擎）是一个用于创建并容器化你的应用程序的开源的集装箱化技术。Docker引擎作为一个客户端-服务器端的应用模式包含如下组件： &lt;br /&gt;
&lt;br /&gt;
* 一个长时间在后台运行的进程(daemon process)作为服务器端 &amp;lt;code&amp;gt;dockerd&amp;lt;/code&amp;gt;.&lt;br /&gt;
* APIs which specify interfaces that programs can use to talk to and instruct the Docker daemon.&lt;br /&gt;
* A command line interface (CLI) client &amp;lt;code&amp;gt;docker&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The CLI uses Docker APIs to control or interact with the Docker daemon through scripting or direct CLI commands. Many other Docker applications use the underlying API and CLI. The daemon creates and manages Docker objects, such as images, containers, networks, and volumes.&lt;br /&gt;
&lt;br /&gt;
For more details, see Docker Architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Open source ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=Build and ship any application anywhere.}}&lt;br /&gt;
{{NavBox |link=軟件:容器技術/Docker/Engine |title=Docker Engine |desc=The industry-leading container runtime.}}&lt;br /&gt;
{{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=Define and run multi-container applications.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AI ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt;&lt;br /&gt;
{{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=Streamline your workflow with your personal AI assistant.}}&lt;br /&gt;
{{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=View and manage your local models.}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Licensing ==&lt;br /&gt;
Commercial use of Docker Engine obtained via Docker Desktop within larger enterprises (exceeding 250 employees OR with annual revenue surpassing $10 million USD), requires a paid subscription. Apache License, Version 2.0. See LICENSE for the full license.&lt;br /&gt;
[[Category:Docker]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=112</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=112"/>
		<updated>2026-05-04T15:49:52Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 開源開發與容器化技術 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=基礎原理:容器技术/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，通過程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
== Docker AI 工具 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=111</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=111"/>
		<updated>2026-05-04T15:48:12Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 開源開發與容器化技術 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=基礎原理:容器技术/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
== Docker AI 工具 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=110</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=110"/>
		<updated>2026-05-04T15:46:45Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 開源開發與容器化技術 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=軟件:容器技術/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
== Docker AI 工具 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=109</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=109"/>
		<updated>2026-05-04T15:46:02Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Docker 技术文档 ==&lt;br /&gt;
本项目致力于 Docker 官方文档的汉化。&lt;br /&gt;
&lt;br /&gt;
== 開源開發與容器化技術 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=軟件:容器技術/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
== Docker AI 工具 ==&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=108</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=108"/>
		<updated>2026-05-04T15:44:24Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Docker 技术文档 ==&lt;br /&gt;
本项目致力于 Docker 官方文档的汉化。&lt;br /&gt;
&lt;br /&gt;
== Open source ==&lt;br /&gt;
===開源開發與容器化技術===&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=軟件:容器技術/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
== AI == &lt;br /&gt;
===所有 Docker AI 工具皆匯集於此，輕鬆取用。===&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
	<entry>
		<id>https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=107</id>
		<title>基礎原理:容器技术/Docker</title>
		<link rel="alternate" type="text/html" href="https://www.opseas.net/index.php?title=%E5%9F%BA%E7%A4%8E%E5%8E%9F%E7%90%86:%E5%AE%B9%E5%99%A8%E6%8A%80%E6%9C%AF/Docker&amp;diff=107"/>
		<updated>2026-05-04T15:42:26Z</updated>

		<summary type="html">&lt;p&gt;Johnson：​&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Docker 技术文档 ==&lt;br /&gt;
本项目致力于 Docker 官方文档的汉化。&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap; gap: 20px; font-family: sans-serif;&amp;quot;&amp;gt; &lt;br /&gt;
== Open source ==&lt;br /&gt;
===開源開發與容器化技術===&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Build |title=Docker Build |desc=在任意地方創建並交付任何軟件}} {{NavBox |link=軟件:容器技術/Docker/Engine |title=Docker Engine |desc=業界領先的容器運行時}} {{NavBox |link=軟件:容器技術/Docker/Compose |title=Docker Compose |desc=定義及運行多運行容器應用}} &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/Docker/Testcontainers |title=Testcontainers |desc=使用您偏好的程式語言，程式化方式執行容器.}} {{NavBox |link=軟件:容器技術/Docker/Agent |title=Docker Agent |desc=開源的多代理解決方案，能協助您完成各項任務.}} &amp;lt;/div&amp;gt;&lt;br /&gt;
== AI == &lt;br /&gt;
===所有 Docker AI 工具皆匯集於此，輕鬆取用。===&lt;br /&gt;
&amp;lt;div style=&amp;quot;display: flex; flex-wrap: wrap;&amp;quot;&amp;gt; {{NavBox |link=軟件:容器技術/AI/Gordon |title=Gordon |desc=透過您的個人 AI 助理，簡化您的工作流程.}} {{NavBox |link=軟件:容器技術/AI/DMR |title=Docker Model Runner |desc=檢視及管理您的本機模型.}} {{NavBox |link=軟件:容器技術/AI/MCP_C_T |title=MCP Catalog and Toolkit |desc=透過 MCP 伺服器強化您的 AI 工作流程.}}&amp;lt;/div&amp;gt;&lt;br /&gt;
 &amp;lt;!-- 建立隱藏分類，不顯示在正文但頁面被歸類 --&amp;gt; [[index.php?title=分类:容器技術]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
=== 技术分类 ===&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Engine|Docker Engine]] (核心运行时)&lt;br /&gt;
* [[基礎原理:容器技术/Docker/Build|Docker Build]] (镜像构建)&lt;br /&gt;
* 返回上一级：[[軟件:容器技術|容器技術主頁]]&lt;br /&gt;
[[index.php?title=分类:容器技术]]&lt;/div&gt;</summary>
		<author><name>Johnson</name></author>
	</entry>
</feed>