初次提交
This commit is contained in:
commit
b60be82a34
57
.gitignore
vendored
Normal file
57
.gitignore
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
# ---> Windows
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# ---> macOS
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# Production
|
||||
node_modules/
|
31
.vitepress/cache/deps/_metadata.json
vendored
Normal file
31
.vitepress/cache/deps/_metadata.json
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"hash": "72ee1963",
|
||||
"configHash": "63f5bf89",
|
||||
"lockfileHash": "dcd677dd",
|
||||
"browserHash": "44aba596",
|
||||
"optimized": {
|
||||
"vue": {
|
||||
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
|
||||
"file": "vue.js",
|
||||
"fileHash": "53df15be",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vue/devtools-api": {
|
||||
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
|
||||
"file": "vitepress___@vue_devtools-api.js",
|
||||
"fileHash": "394d0563",
|
||||
"needsInterop": false
|
||||
},
|
||||
"vitepress > @vueuse/core": {
|
||||
"src": "../../../node_modules/@vueuse/core/index.mjs",
|
||||
"file": "vitepress___@vueuse_core.js",
|
||||
"fileHash": "5841a618",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-VJWGEPT5": {
|
||||
"file": "chunk-VJWGEPT5.js"
|
||||
}
|
||||
}
|
||||
}
|
12542
.vitepress/cache/deps/chunk-VJWGEPT5.js
vendored
Normal file
12542
.vitepress/cache/deps/chunk-VJWGEPT5.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/chunk-VJWGEPT5.js.map
vendored
Normal file
7
.vitepress/cache/deps/chunk-VJWGEPT5.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
3
.vitepress/cache/deps/package.json
vendored
Normal file
3
.vitepress/cache/deps/package.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
4512
.vitepress/cache/deps/vitepress___@vue_devtools-api.js
vendored
Normal file
4512
.vitepress/cache/deps/vitepress___@vue_devtools-api.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map
vendored
Normal file
7
.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
9370
.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
Normal file
9370
.vitepress/cache/deps/vitepress___@vueuse_core.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
.vitepress/cache/deps/vitepress___@vueuse_core.js.map
vendored
Normal file
7
.vitepress/cache/deps/vitepress___@vueuse_core.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
343
.vitepress/cache/deps/vue.js
vendored
Normal file
343
.vitepress/cache/deps/vue.js
vendored
Normal file
@ -0,0 +1,343 @@
|
||||
import {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBaseVNode,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
} from "./chunk-VJWGEPT5.js";
|
||||
export {
|
||||
BaseTransition,
|
||||
BaseTransitionPropsValidators,
|
||||
Comment,
|
||||
DeprecationTypes,
|
||||
EffectScope,
|
||||
ErrorCodes,
|
||||
ErrorTypeStrings,
|
||||
Fragment,
|
||||
KeepAlive,
|
||||
ReactiveEffect,
|
||||
Static,
|
||||
Suspense,
|
||||
Teleport,
|
||||
Text,
|
||||
TrackOpTypes,
|
||||
Transition,
|
||||
TransitionGroup,
|
||||
TriggerOpTypes,
|
||||
VueElement,
|
||||
assertNumber,
|
||||
callWithAsyncErrorHandling,
|
||||
callWithErrorHandling,
|
||||
camelize,
|
||||
capitalize,
|
||||
cloneVNode,
|
||||
compatUtils,
|
||||
compile,
|
||||
computed,
|
||||
createApp,
|
||||
createBlock,
|
||||
createCommentVNode,
|
||||
createElementBlock,
|
||||
createBaseVNode as createElementVNode,
|
||||
createHydrationRenderer,
|
||||
createPropsRestProxy,
|
||||
createRenderer,
|
||||
createSSRApp,
|
||||
createSlots,
|
||||
createStaticVNode,
|
||||
createTextVNode,
|
||||
createVNode,
|
||||
customRef,
|
||||
defineAsyncComponent,
|
||||
defineComponent,
|
||||
defineCustomElement,
|
||||
defineEmits,
|
||||
defineExpose,
|
||||
defineModel,
|
||||
defineOptions,
|
||||
defineProps,
|
||||
defineSSRCustomElement,
|
||||
defineSlots,
|
||||
devtools,
|
||||
effect,
|
||||
effectScope,
|
||||
getCurrentInstance,
|
||||
getCurrentScope,
|
||||
getCurrentWatcher,
|
||||
getTransitionRawChildren,
|
||||
guardReactiveProps,
|
||||
h,
|
||||
handleError,
|
||||
hasInjectionContext,
|
||||
hydrate,
|
||||
hydrateOnIdle,
|
||||
hydrateOnInteraction,
|
||||
hydrateOnMediaQuery,
|
||||
hydrateOnVisible,
|
||||
initCustomFormatter,
|
||||
initDirectivesForSSR,
|
||||
inject,
|
||||
isMemoSame,
|
||||
isProxy,
|
||||
isReactive,
|
||||
isReadonly,
|
||||
isRef,
|
||||
isRuntimeOnly,
|
||||
isShallow,
|
||||
isVNode,
|
||||
markRaw,
|
||||
mergeDefaults,
|
||||
mergeModels,
|
||||
mergeProps,
|
||||
nextTick,
|
||||
normalizeClass,
|
||||
normalizeProps,
|
||||
normalizeStyle,
|
||||
onActivated,
|
||||
onBeforeMount,
|
||||
onBeforeUnmount,
|
||||
onBeforeUpdate,
|
||||
onDeactivated,
|
||||
onErrorCaptured,
|
||||
onMounted,
|
||||
onRenderTracked,
|
||||
onRenderTriggered,
|
||||
onScopeDispose,
|
||||
onServerPrefetch,
|
||||
onUnmounted,
|
||||
onUpdated,
|
||||
onWatcherCleanup,
|
||||
openBlock,
|
||||
popScopeId,
|
||||
provide,
|
||||
proxyRefs,
|
||||
pushScopeId,
|
||||
queuePostFlushCb,
|
||||
reactive,
|
||||
readonly,
|
||||
ref,
|
||||
registerRuntimeCompiler,
|
||||
render,
|
||||
renderList,
|
||||
renderSlot,
|
||||
resolveComponent,
|
||||
resolveDirective,
|
||||
resolveDynamicComponent,
|
||||
resolveFilter,
|
||||
resolveTransitionHooks,
|
||||
setBlockTracking,
|
||||
setDevtoolsHook,
|
||||
setTransitionHooks,
|
||||
shallowReactive,
|
||||
shallowReadonly,
|
||||
shallowRef,
|
||||
ssrContextKey,
|
||||
ssrUtils,
|
||||
stop,
|
||||
toDisplayString,
|
||||
toHandlerKey,
|
||||
toHandlers,
|
||||
toRaw,
|
||||
toRef,
|
||||
toRefs,
|
||||
toValue,
|
||||
transformVNodeArgs,
|
||||
triggerRef,
|
||||
unref,
|
||||
useAttrs,
|
||||
useCssModule,
|
||||
useCssVars,
|
||||
useHost,
|
||||
useId,
|
||||
useModel,
|
||||
useSSRContext,
|
||||
useShadowRoot,
|
||||
useSlots,
|
||||
useTemplateRef,
|
||||
useTransitionState,
|
||||
vModelCheckbox,
|
||||
vModelDynamic,
|
||||
vModelRadio,
|
||||
vModelSelect,
|
||||
vModelText,
|
||||
vShow,
|
||||
version,
|
||||
warn,
|
||||
watch,
|
||||
watchEffect,
|
||||
watchPostEffect,
|
||||
watchSyncEffect,
|
||||
withAsyncContext,
|
||||
withCtx,
|
||||
withDefaults,
|
||||
withDirectives,
|
||||
withKeys,
|
||||
withMemo,
|
||||
withModifiers,
|
||||
withScopeId
|
||||
};
|
||||
//# sourceMappingURL=vue.js.map
|
7
.vitepress/cache/deps/vue.js.map
vendored
Normal file
7
.vitepress/cache/deps/vue.js.map
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
39
.vitepress/config.mts
Normal file
39
.vitepress/config.mts
Normal file
@ -0,0 +1,39 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig({
|
||||
title: "Docker Docs",
|
||||
description: "使用手册",
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
nav: [
|
||||
{ text: 'Home', link: '/' },
|
||||
{ text: 'Examples', link: '/markdown-examples' }
|
||||
],
|
||||
|
||||
sidebar: {
|
||||
'/docs/engine': [
|
||||
{
|
||||
text: "引擎",
|
||||
items: [
|
||||
{ text: '概述', link: '/docs/engine/' },
|
||||
{
|
||||
text: '安装',
|
||||
collapsed: false,
|
||||
link: '/docs/engine/about',
|
||||
items: [
|
||||
{ text: "Ubuntu", link: '/docs/engine/ubuntu' },
|
||||
{ text: "Debian", link: '/docs/engine/debian' },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
|
||||
]
|
||||
}
|
||||
})
|
17
.vitepress/theme/index.ts
Normal file
17
.vitepress/theme/index.ts
Normal file
@ -0,0 +1,17 @@
|
||||
// https://vitepress.dev/guide/custom-theme
|
||||
import { h } from 'vue'
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import './style.css'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: () => {
|
||||
return h(DefaultTheme.Layout, null, {
|
||||
// https://vitepress.dev/guide/extending-default-theme#layout-slots
|
||||
})
|
||||
},
|
||||
enhanceApp({ app, router, siteData }) {
|
||||
// ...
|
||||
}
|
||||
} satisfies Theme
|
139
.vitepress/theme/style.css
Normal file
139
.vitepress/theme/style.css
Normal file
@ -0,0 +1,139 @@
|
||||
/**
|
||||
* Customize default theme styling by overriding CSS variables:
|
||||
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
|
||||
*/
|
||||
|
||||
/**
|
||||
* Colors
|
||||
*
|
||||
* Each colors have exact same color scale system with 3 levels of solid
|
||||
* colors with different brightness, and 1 soft color.
|
||||
*
|
||||
* - `XXX-1`: The most solid color used mainly for colored text. It must
|
||||
* satisfy the contrast ratio against when used on top of `XXX-soft`.
|
||||
*
|
||||
* - `XXX-2`: The color used mainly for hover state of the button.
|
||||
*
|
||||
* - `XXX-3`: The color for solid background, such as bg color of the button.
|
||||
* It must satisfy the contrast ratio with pure white (#ffffff) text on
|
||||
* top of it.
|
||||
*
|
||||
* - `XXX-soft`: The color used for subtle background such as custom container
|
||||
* or badges. It must satisfy the contrast ratio when putting `XXX-1` colors
|
||||
* on top of it.
|
||||
*
|
||||
* The soft color must be semi transparent alpha channel. This is crucial
|
||||
* because it allows adding multiple "soft" colors on top of each other
|
||||
* to create a accent, such as when having inline code block inside
|
||||
* custom containers.
|
||||
*
|
||||
* - `default`: The color used purely for subtle indication without any
|
||||
* special meanings attached to it such as bg color for menu hover state.
|
||||
*
|
||||
* - `brand`: Used for primary brand colors, such as link text, button with
|
||||
* brand theme, etc.
|
||||
*
|
||||
* - `tip`: Used to indicate useful information. The default theme uses the
|
||||
* brand color for this by default.
|
||||
*
|
||||
* - `warning`: Used to indicate warning to the users. Used in custom
|
||||
* container, badges, etc.
|
||||
*
|
||||
* - `danger`: Used to show error, or dangerous message to the users. Used
|
||||
* in custom container, badges, etc.
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-c-default-1: var(--vp-c-gray-1);
|
||||
--vp-c-default-2: var(--vp-c-gray-2);
|
||||
--vp-c-default-3: var(--vp-c-gray-3);
|
||||
--vp-c-default-soft: var(--vp-c-gray-soft);
|
||||
|
||||
--vp-c-brand-1: var(--vp-c-indigo-1);
|
||||
--vp-c-brand-2: var(--vp-c-indigo-2);
|
||||
--vp-c-brand-3: var(--vp-c-indigo-3);
|
||||
--vp-c-brand-soft: var(--vp-c-indigo-soft);
|
||||
|
||||
--vp-c-tip-1: var(--vp-c-brand-1);
|
||||
--vp-c-tip-2: var(--vp-c-brand-2);
|
||||
--vp-c-tip-3: var(--vp-c-brand-3);
|
||||
--vp-c-tip-soft: var(--vp-c-brand-soft);
|
||||
|
||||
--vp-c-warning-1: var(--vp-c-yellow-1);
|
||||
--vp-c-warning-2: var(--vp-c-yellow-2);
|
||||
--vp-c-warning-3: var(--vp-c-yellow-3);
|
||||
--vp-c-warning-soft: var(--vp-c-yellow-soft);
|
||||
|
||||
--vp-c-danger-1: var(--vp-c-red-1);
|
||||
--vp-c-danger-2: var(--vp-c-red-2);
|
||||
--vp-c-danger-3: var(--vp-c-red-3);
|
||||
--vp-c-danger-soft: var(--vp-c-red-soft);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Button
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-button-brand-border: transparent;
|
||||
--vp-button-brand-text: var(--vp-c-white);
|
||||
--vp-button-brand-bg: var(--vp-c-brand-3);
|
||||
--vp-button-brand-hover-border: transparent;
|
||||
--vp-button-brand-hover-text: var(--vp-c-white);
|
||||
--vp-button-brand-hover-bg: var(--vp-c-brand-2);
|
||||
--vp-button-brand-active-border: transparent;
|
||||
--vp-button-brand-active-text: var(--vp-c-white);
|
||||
--vp-button-brand-active-bg: var(--vp-c-brand-1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Home
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-home-hero-name-color: transparent;
|
||||
--vp-home-hero-name-background: -webkit-linear-gradient(
|
||||
120deg,
|
||||
#bd34fe 30%,
|
||||
#41d1ff
|
||||
);
|
||||
|
||||
--vp-home-hero-image-background-image: linear-gradient(
|
||||
-45deg,
|
||||
#bd34fe 50%,
|
||||
#47caff 50%
|
||||
);
|
||||
--vp-home-hero-image-filter: blur(44px);
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(56px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 960px) {
|
||||
:root {
|
||||
--vp-home-hero-image-filter: blur(68px);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Custom Block
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
:root {
|
||||
--vp-custom-block-tip-border: transparent;
|
||||
--vp-custom-block-tip-text: var(--vp-c-text-1);
|
||||
--vp-custom-block-tip-bg: var(--vp-c-brand-soft);
|
||||
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
|
||||
}
|
||||
|
||||
/**
|
||||
* Component: Algolia
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
.DocSearch {
|
||||
--docsearch-primary-color: var(--vp-c-brand-1) !important;
|
||||
}
|
||||
|
49
api-examples.md
Normal file
49
api-examples.md
Normal file
@ -0,0 +1,49 @@
|
||||
---
|
||||
outline: deep
|
||||
---
|
||||
|
||||
# Runtime API Examples
|
||||
|
||||
This page demonstrates usage of some of the runtime APIs provided by VitePress.
|
||||
|
||||
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
|
||||
|
||||
```md
|
||||
<script setup>
|
||||
import { useData } from 'vitepress'
|
||||
|
||||
const { theme, page, frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
## Results
|
||||
|
||||
### Theme Data
|
||||
<pre>{{ theme }}</pre>
|
||||
|
||||
### Page Data
|
||||
<pre>{{ page }}</pre>
|
||||
|
||||
### Page Frontmatter
|
||||
<pre>{{ frontmatter }}</pre>
|
||||
```
|
||||
|
||||
<script setup>
|
||||
import { useData } from 'vitepress'
|
||||
|
||||
const { site, theme, page, frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
## Results
|
||||
|
||||
### Theme Data
|
||||
<pre>{{ theme }}</pre>
|
||||
|
||||
### Page Data
|
||||
<pre>{{ page }}</pre>
|
||||
|
||||
### Page Frontmatter
|
||||
<pre>{{ frontmatter }}</pre>
|
||||
|
||||
## More
|
||||
|
||||
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
|
31
components/navBtn.vue
Normal file
31
components/navBtn.vue
Normal file
@ -0,0 +1,31 @@
|
||||
<script setup>
|
||||
import NavBtn from "./navBtnItem.vue";
|
||||
defineProps({
|
||||
listData:[]
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ul class="navbtn">
|
||||
<li class="navbtn-item" v-for="list in listData">
|
||||
<NavBtn :href="list.href" :title="list.title" :desc="list.desc"/>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.navbtn {
|
||||
width: 100%;
|
||||
margin-left: -20px !important;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-auto-rows: minmax(100px, auto);
|
||||
gap: 8px;
|
||||
|
||||
}
|
||||
.navbtn-item {
|
||||
margin: 0 !important;
|
||||
list-style: none inside;
|
||||
border: 1px solid var(--vp-c-default-1);
|
||||
}
|
||||
</style>
|
29
components/navBtnItem.vue
Normal file
29
components/navBtnItem.vue
Normal file
@ -0,0 +1,29 @@
|
||||
<script setup>
|
||||
|
||||
defineProps({
|
||||
title: String,
|
||||
desc: String,
|
||||
href: URL
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="nav-btn-item">
|
||||
<a :href="href">{{ title }}</a>
|
||||
<text>{{ desc }}</text>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.nav-btn-item {
|
||||
padding: 12px;
|
||||
a {
|
||||
text-decoration: none;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
text {
|
||||
margin-top: .2rem;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
54
docs/engine/about.md
Normal file
54
docs/engine/about.md
Normal file
@ -0,0 +1,54 @@
|
||||
# 安装 Docker 引擎
|
||||
|
||||
本节将介绍如何在 Linux 上安装 Docker Engine,也称为 Docker CE。Docker Engine 还可在 Windows、macOS 和 Linux 上通过 Docker Desktop 进行安装。有关 Docker Desktop 的安装说明,请参阅:[Docker Desktop 概述](https://docs.docker.com/desktop/)。
|
||||
|
||||
## 支持的平台
|
||||
|
||||
| 平台 | x86_64/amd64 | arm64 或 aarch64 | arm(32 位) | ppc64le | s390x |
|
||||
| - | :-: | :-: | :-: | :-: | :-: |
|
||||
| CentOS | ✅ | ✅ | | ✅ | |
|
||||
| Debian | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Fedora | ✅ | ✅ | | ✅ | |
|
||||
| Raspberry Pi OS (32-bit) | | | ✅ | | |
|
||||
| RHEL | ✅ | ✅ | | | ✅ |
|
||||
| SLES | | | | | ✅ |
|
||||
| Ubuntu | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| Binaries | ✅ | ✅ | ✅ | | |
|
||||
|
||||
### 其他 Linux 发行版
|
||||
:::tip
|
||||
尽管以下说明可能有效,但 Docker 不会在发行版衍生产品上测试或验证安装。
|
||||
:::
|
||||
- 如果您使用 Debian 衍生产品,例如“BunsenLabs Linux”、“Kali Linux”或“LMDE”(基于 Debian 的 Mint),则应遵循 [Debian](/docs/engine/debian)的安装说明,将您的发行版版本替换为相应的 Debian 版本。请参阅您的发行版的文档,以查找与您的衍生版本相对应的 Debian 版本。
|
||||
- 同样,如果您使用 Ubuntu 衍生版本(例如“Kubuntu”、“Lubuntu”或“Xubuntu”),则应遵循 [Ubuntu](/docs/engine/ubuntu)的安装说明,将您的发行版版本替换为相应的 Ubuntu 版本。请参阅发行版的文档,以查找与您的衍生版本相对应的 Ubuntu 版本。
|
||||
- 一些 Linux 发行版通过其软件包存储库提供 Docker Engine 软件包。这些软件包由 Linux 发行版的软件包维护者构建和维护,可能存在配置差异或基于修改后的源代码构建。Docker 不参与发布这些软件包,您应将涉及这些软件包的任何错误或问题报告给您的 Linux 发行版的问题跟踪器。
|
||||
|
||||
Docker 提供 用于手动安装 Docker Engine 的[二进制文件](https://docs.docker.com/engine/install/binaries/)。这些二进制文件是静态链接的,您可以在任何 Linux 发行版上使用它们。
|
||||
|
||||
## 发布渠道
|
||||
Docker Engine 有两种类型的更新渠道,稳定版和测试版:
|
||||
|
||||
- **稳定**频道为您提供可供公众使用的最新版本。
|
||||
- **测试**频道为您提供在正式发布之前可供测试的预发布版本。
|
||||
请谨慎使用测试渠道。预发布版本包含实验性和抢先体验功能,可能会发生重大更改。
|
||||
|
||||
## 支持
|
||||
Docker Engine 是一个开源项目,由 Moby 项目维护者和社区成员支持。Docker 不提供对 Docker Engine 的支持。Docker 为 Docker 产品提供支持,包括使用 Docker Engine 作为其组件之一的 Docker Desktop。
|
||||
|
||||
有关该开源项目的信息,请参阅 [Moby 项目网站](https://mobyproject.org/)。
|
||||
|
||||
## 升级路径
|
||||
补丁版本始终与其主版本和次版本向后兼容。
|
||||
|
||||
## 许可
|
||||
Docker Engine 遵循 Apache 许可证 2.0 版。请参阅 [LICENSE](https://github.com/moby/moby/blob/master/LICENSE) 以获取完整的许可证文本。
|
||||
|
||||
## 报告安全问题
|
||||
如果您发现安全问题,请立即告知我们。
|
||||
|
||||
请勿提交公开问题。请将您的报告私下提交给 `security@docker.com`。
|
||||
|
||||
非常感谢您的安全报告,Docker 将公开感谢您。
|
||||
|
||||
## 开始使用
|
||||
设置 Docker 后,您可以通过 [Docker 入门](https://docs.docker.com/get-started/introduction/)了解基础知识。
|
50
docs/engine/debian.md
Normal file
50
docs/engine/debian.md
Normal file
@ -0,0 +1,50 @@
|
||||
---
|
||||
outline: [2,4]
|
||||
---
|
||||
|
||||
# 在 Debian 上安装 Docker Engine
|
||||
|
||||
要在 Debian 上开始使用 Docker Engine,请确保您 [满足先决条件](#先决条件),然后按照 [安装步骤](#安装方法)进行操作。
|
||||
|
||||
## 先决条件
|
||||
### 防火墙限制
|
||||
:::warning 警告
|
||||
在安装 Docker 之前,请确保考虑以下安全隐患和防火墙不兼容性。
|
||||
:::
|
||||
|
||||
- 如果您使用 ufw 或firewalld 来管理防火墙设置,请注意,当您使用 Docker 公开容器端口时,这些端口会绕过防火墙规则。有关更多信息,请参阅 [Docker 和 ufw](https://docs.docker.com/engine/network/packet-filtering-firewalls/#docker-and-ufw)。
|
||||
- Docker 仅与`iptables-nft`和兼容`iptables-legacy`。使用 创建的防火墙规则`nft`在安装了 Docker 的系统上不受支持。确保您使用的任何防火墙规则集都是使用`iptables`或创建的`ip6tables`,并且将它们添加到`DOCKER-USER`链中,请参阅 [数据包过滤和防火墙](https://docs.docker.com/engine/network/packet-filtering-firewalls/)。
|
||||
|
||||
### 操作系统要求
|
||||
|
||||
要安装 Docker Engine,您需要以下 Debian 版本之一的 64 位版本:
|
||||
|
||||
- Debian Bookworm 12(稳定版)
|
||||
- Debian Bullseye 11(旧稳定版)
|
||||
Debian 的 Docker Engine 与 x86_64(或 amd64)、armhf、arm64 和 ppc64le(ppc64el)架构兼容。
|
||||
|
||||
### 卸载旧版本
|
||||
在安装 Docker Engine 之前,您需要卸载所有有冲突的软件包。
|
||||
|
||||
您的 Linux 发行版可能提供了非官方的 Docker 软件包,这些软件包可能会与 Docker 提供的官方软件包冲突。您必须在安装 Docker Engine 正式版之前卸载这些软件包。
|
||||
|
||||
要卸载的非官方软件包包括:
|
||||
|
||||
- `docker.io`
|
||||
- `docker-compose`
|
||||
- `docker-doc`
|
||||
- `podman-docker`
|
||||
|
||||
此外,Docker Engine 依赖于`containerd`和`runc`。Docker Engine 将这些依赖项捆绑为一个包:`containerd.io`。如果您之前安装了`containerd`或`runc`,请卸载它们以避免与 Docker Engine 捆绑的版本冲突。
|
||||
|
||||
运行以下命令来卸载所有冲突的包:
|
||||
|
||||
```bash
|
||||
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
|
||||
```
|
||||
|
||||
`apt-get`可能会报告您没有安装这些包。
|
||||
|
||||
卸载 Docker 时,不会自动删除存储在中的图像、容器、卷和网络`/var/lib/docker/`。如果您想从全新安装开始,并且希望清理所有现有数据,请阅读 [卸载 Docker Engine](#卸载DockerEngine)部分。
|
||||
|
||||
## 安装方法
|
71
docs/engine/index.md
Normal file
71
docs/engine/index.md
Normal file
@ -0,0 +1,71 @@
|
||||
<script setup>
|
||||
import NavList from '/components/navBtn.vue'
|
||||
const nav_lists =[
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '安装Docker引擎',
|
||||
desc: '学习如何为你的发行版安装开源的Docker引擎。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '存储',
|
||||
desc: '使用Docker容器和持久化数据。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '网络',
|
||||
desc: '管理容器之间的网络连接。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '容器日志',
|
||||
desc: '学习如何查看和读取容器日志'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '修剪',
|
||||
desc: '清理未使用的资源。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '配置守护进程',
|
||||
desc: '深入了解Docker守护进程的配置选项。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '无根模式',
|
||||
desc: '以非 root 权限运行Docker。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '已弃用特性',
|
||||
desc: '找出你应该停止使用 Docker Engine 的哪些功能。'
|
||||
},
|
||||
{
|
||||
href: "baidu.com",
|
||||
title: '发布说明',
|
||||
desc: '阅读最新版本的发布说明。'
|
||||
},
|
||||
]
|
||||
</script>
|
||||
|
||||
# Docker Engine
|
||||
|
||||
Docker 引擎是一种用于构建和容器化应用程序的开源容器化技术。Docker 引擎作为一个客户端-服务器应用程序,具有以下功能:
|
||||
|
||||
- 一台服务器运行着一个长时间守护进程 `dockerd` 。
|
||||
- 指定程序与 Docker 守护进程进行通信和指令的接口的 API。
|
||||
- 命令行接口(CLI)客户端 `docker` 。
|
||||
|
||||
CLI 使用 Docker API 来通过脚本或直接 CLI 命令控制或与 Docker 守护进程进行交互。许多其他 Docker 应用程序使用底层的 API 和 CLI。守护进程创建和管理 Docker 对象,如镜像、容器、网络和卷。
|
||||
|
||||
有关更多详情,请参见 [Docker 架构](https://docs.docker.com/get-started/docker-overview/#docker-architecture)。
|
||||
|
||||
<NavList :listData="nav_lists" />
|
||||
|
||||
|
||||
|
||||
## 许可证
|
||||
Docker Engine 的许可证是 Apache License 2.0。有关完整许可证条款,请参阅 LICENSE 文件。
|
||||
|
||||
然而,对于大型企业(员工人数超过 250 人或年收入超过 1000 万美元)在 Docker Desktop 内部使用的 Docker 引擎的商业用途,需要付费订阅。
|
238
docs/engine/ubuntu.md
Normal file
238
docs/engine/ubuntu.md
Normal file
@ -0,0 +1,238 @@
|
||||
---
|
||||
outline: [2,5]
|
||||
---
|
||||
|
||||
# 在 Ubuntu 上安装 Docker 引擎
|
||||
|
||||
要在 Ubuntu 上开始使用 Docker Engine,请确保您 [满足先决条件](#先决条件),然后按照 [安装步骤](#安装方法)进行操作。
|
||||
|
||||
## 先决条件
|
||||
### 防火墙限制
|
||||
:::warning 警告
|
||||
在安装 Docker 之前,请确保考虑以下安全隐患和防火墙不兼容性。
|
||||
:::
|
||||
|
||||
- 如果您使用 ufw 或firewalld 来管理防火墙设置,请注意,当您使用 Docker 公开容器端口时,这些端口会绕过防火墙规则。有关更多信息,请参阅 [Docker 和 ufw](https://docs.docker.com/engine/network/packet-filtering-firewalls/#docker-and-ufw)。
|
||||
- Docker 仅与`iptables-nft`和兼容`iptables-legacy`。使用 创建的防火墙规则`nft`在安装了 Docker 的系统上不受支持。确保您使用的任何防火墙规则集都是使用`iptables`或创建的`ip6tables`,并且将它们添加到`DOCKER-USER`链中,请参阅 [数据包过滤和防火墙](https://docs.docker.com/engine/network/packet-filtering-firewalls/)。
|
||||
|
||||
### 操作系统要求
|
||||
要安装 Docker Engine,您需要以下 Ubuntu 版本之一的 64 位版本:
|
||||
|
||||
- Ubuntu Oracular 24.10
|
||||
- Ubuntu Noble 24.04 (LTS)
|
||||
- Ubuntu Jammy 22.04 (LTS)
|
||||
- Ubuntu Focal 20.04 (LTS)
|
||||
|
||||
Ubuntu 的 Docker Engine 与 x86_64(或 amd64)、armhf、arm64、s390x 和 ppc64le(ppc64el)架构兼容。
|
||||
|
||||
### 卸载旧版本
|
||||
在安装 Docker Engine 之前,您需要卸载所有有冲突的软件包。
|
||||
|
||||
您的 Linux 发行版可能提供了非官方的 Docker 软件包,这些软件包可能会与 Docker 提供的官方软件包冲突。您必须在安装 Docker Engine 正式版之前卸载这些软件包。
|
||||
|
||||
要卸载的非官方软件包包括:
|
||||
|
||||
- `docker.io`
|
||||
- `docker-compose`
|
||||
- `docker-compose-v2`
|
||||
- `docker-doc`
|
||||
- `podman-docker`
|
||||
|
||||
此外,Docker Engine 依赖于`containerd`和`runc`。Docker Engine 将这些依赖项捆绑为一个包:`containerd.io`。如果您之前安装了`containerd`或`runc`,请卸载它们以避免与 Docker Engine 捆绑的版本冲突。
|
||||
|
||||
运行以下命令来卸载所有冲突的包:
|
||||
|
||||
```bash
|
||||
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
|
||||
```
|
||||
`apt-get`可能会报告您没有安装这些包。
|
||||
|
||||
卸载 Docker 时,不会自动删除存储在中的图像、容器、卷和网络`/var/lib/docker/`。如果您想从全新安装开始,并且希望清理所有现有数据,请阅读 [卸载 Docker Engine部分](#卸载DockerEngine部分)。
|
||||
|
||||
## 安装方法
|
||||
您可以根据需要通过不同的方式安装 Docker Engine:
|
||||
|
||||
- [Docker Engine 与Docker Desktop for Linux](https://docs.docker.com/desktop/setup/install/linux/)捆绑在一起 。这是最简单、最快捷的入门方式。
|
||||
- 从[Docker的`apt`](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)存储库设置并安装 Docker Engine 。
|
||||
- [手动安装](https://docs.docker.com/engine/install/ubuntu/#install-from-a-package)并手动管理升级。
|
||||
- 使用 [便捷脚本](https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script)。仅推荐用于测试和开发环境。
|
||||
|
||||
### 使用apt存储库安装
|
||||
在新的主机上首次安装 Docker Engine 之前,您需要设置 Docker `apt`存储库。之后,您可以从存储库安装和更新 Docker。
|
||||
|
||||
1. 设置 Docker 的`apt`存储库。
|
||||
```bash
|
||||
# Add Docker's official GPG key:
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update
|
||||
```
|
||||
|
||||
::: info 笔记
|
||||
如果您使用 Ubuntu 衍生发行版,例如 Linux Mint,则可能需要使用`UBUNTU_CODENAME`而不是`VERSION_CODENAME`。
|
||||
:::
|
||||
|
||||
2. 安装 Docker 包。
|
||||
|
||||
::: code-group
|
||||
|
||||
```bash [最新的]
|
||||
# 要安装最新版本,请运行:
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
```
|
||||
|
||||
```bash [具体版本]
|
||||
# 要安装特定版本的 Docker Engine,请首先列出存储库中的可用版本:
|
||||
# List the available versions:
|
||||
apt-cache madison docker-ce | awk '{ print $3 }'
|
||||
|
||||
5:27.4.0-1~ubuntu.24.04~noble
|
||||
5:27.3.1-1~ubuntu.24.04~noble
|
||||
...
|
||||
|
||||
# 或
|
||||
|
||||
# 选择所需版本并安装:
|
||||
|
||||
VERSION_STRING=5:27.4.0-1~ubuntu.24.04~noble
|
||||
sudo apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
```
|
||||
:::
|
||||
|
||||
3. 通过运行镜像来验证安装是否成功`hello-world`:
|
||||
```bash
|
||||
sudo docker run hello-world
|
||||
```
|
||||
此命令下载测试映像并在容器中运行。容器运行时,它会打印一条确认消息并退出。
|
||||
|
||||
您现已成功安装并启动了 Docker Engine。
|
||||
|
||||
::: tip 提示
|
||||
尝试以非 root 身份运行时出现错误?
|
||||
|
||||
用户组`docker`存在但不包含任何用户,这就是您需要使用`sudo`来运行 Docker 命令的原因。继续进行 [Linux 安装后操作](https://docs.docker.com/engine/install/linux-postinstall) 以允许非特权用户运行 Docker 命令并执行其他可选配置步骤。
|
||||
:::
|
||||
|
||||
#### 升级 Docker 引擎
|
||||
要升级 Docker Engine,请按照 [安装说明](#安装方法)的第 2 步进行操作,选择要安装的新版本。
|
||||
|
||||
### 从包中安装
|
||||
|
||||
如果您无法使用 Docker 的`apt`存储库来安装 Docker Engine,您可以下载`deb`适合您版本的文件并手动安装。每次要升级 Docker Engine 时,都需要下载一个新文件。
|
||||
|
||||
1. 转至 [`https://download.docker.com/linux/ubuntu/dists/`](https://download.docker.com/linux/ubuntu/dists/)。
|
||||
2. 在列表中选择您的 Ubuntu 版本。
|
||||
3. 转到`pool/stable/`并选择适用的架构(`amd64`、 `armhf`、`arm64`或`s390x`)。
|
||||
4. `deb`下载Docker Engine、CLI、containerd 和 Docker Compose 软件包的以下文件:
|
||||
- `containerd.io_<version>_<arch>.deb`
|
||||
- `docker-ce_<version>_<arch>.deb`
|
||||
- `docker-ce-cli_<version>_<arch>.deb`
|
||||
- `docker-buildx-plugin_<version>_<arch>.deb`
|
||||
- `docker-compose-plugin_<version>_<arch>.deb`
|
||||
5. 安装`.deb`软件包。将以下示例中的路径更新为您下载 Docker 软件包的位置。
|
||||
```bash
|
||||
sudo dpkg -i ./containerd.io_<version>_<arch>.deb \
|
||||
./docker-ce_<version>_<arch>.deb \
|
||||
./docker-ce-cli_<version>_<arch>.deb \
|
||||
./docker-buildx-plugin_<version>_<arch>.deb \
|
||||
./docker-compose-plugin_<version>_<arch>.deb
|
||||
```
|
||||
Docker 守护进程自动启动。
|
||||
|
||||
6. 通过运行镜像来验证安装是否成功`hello-world`:
|
||||
```bash
|
||||
sudo service docker start
|
||||
sudo docker run hello-world
|
||||
```
|
||||
此命令下载测试映像并在容器中运行。容器运行时,它会打印一条确认消息并退出。
|
||||
|
||||
您现已成功安装并启动了 Docker Engine。
|
||||
|
||||
:::tip 提示
|
||||
尝试以非 root 身份运行时出现错误?
|
||||
|
||||
用户组`docker`存在但不包含任何用户,这就是您需要使用`sudo`来运行 Docker 命令的原因。继续进行 [Linux 安装后](https://docs.docker.com/engine/install/linux-postinstall)操作 以允许非特权用户运行 Docker 命令并执行其他可选配置步骤。
|
||||
:::
|
||||
|
||||
#### 升级 Docker 引擎
|
||||
要升级 Docker Engine,请下载较新的软件包文件并重复 [安装过程](#从包中安装),指向新文件。
|
||||
|
||||
### 使用便捷脚本安装
|
||||
Docker 在[https://get.docker.com/](https://get.docker.com/)上提供了一个便捷脚本, 用于以非交互方式将 Docker 安装到开发环境中。不建议在生产环境中使用该便捷脚本,但它对于创建根据您的需求量身定制的配置脚本很有用。另请参阅 [使用存储库安装](#使用apt存储库安装)步骤以了解使用软件包存储库安装的安装步骤。该脚本的源代码是开源的,您可以在 [`docker-install`GitHub](https://github.com/docker/docker-install) 上的存储库中找到它。
|
||||
|
||||
在本地运行从互联网下载的脚本之前,请务必检查这些脚本。在安装之前,请熟悉便利脚本的潜在风险和限制:
|
||||
|
||||
- 该脚本需要`root`或`sudo`权限才能运行。
|
||||
- 该脚本尝试检测您的 Linux 发行版和版本并为您配置包管理系统。
|
||||
- 该脚本不允许您自定义大多数安装参数。
|
||||
-该脚本无需确认即可安装依赖项和建议。这可能会安装大量软件包,具体取决于主机的当前配置。
|
||||
- 默认情况下,该脚本会安装 Docker、containerd 和 runc 的最新稳定版本。使用此脚本配置机器时,可能会导致 Docker 意外的主要版本升级。在部署到生产系统之前,请务必在测试环境中测试升级。
|
||||
- 该脚本并非用于升级现有 Docker 安装。使用该脚本更新现有安装时,依赖项可能不会更新为预期版本,从而导致版本过时。
|
||||
|
||||
::: tip 提示
|
||||
运行前预览脚本步骤。您可以运行脚本,并可以选择`--dry-run`了解脚本在调用时将运行哪些步骤:
|
||||
```bash
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sudo sh ./get-docker.sh --dry-run
|
||||
```
|
||||
:::
|
||||
|
||||
此示例从[https://get.docker.com/](https://get.docker.com/)下载脚本 并运行它以在 Linux 上安装 Docker 的最新稳定版本:
|
||||
```bash
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sudo sh get-docker.sh
|
||||
Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737
|
||||
<...>
|
||||
```
|
||||
您现在已成功安装并启动了 Docker Engine。该`docker` 服务在基于 Debian 的发行版上自动启动。在RPM基于发行版(例如 CentOS、Fedora、RHEL 或 SLES)上,您需要使用适当的`systemctl`或`service`命令手动启动它。如消息所示,非 root 用户默认无法运行 Docker 命令。
|
||||
|
||||
::: tip 以非特权用户身份使用 Docker,还是以无根模式安装?
|
||||
|
||||
安装脚本需要`root`或`sudo`权限才能安装和使用 Docker。如果您想授予非 root 用户访问 Docker 的权限,请参阅 [Linux 的安装后步骤](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)。您还可以安装没有root权限的 Docker,或将其配置为以无 root 模式运行。有关以无 root 模式运行 Docker 的说明,请参阅 [以非 root 用户身份运行 Docker 守护程序(无 root 模式)](https://docs.docker.com/engine/security/rootless/)。
|
||||
:::
|
||||
|
||||
#### 安装预发布版本
|
||||
Docker 还在[https://test.docker.com/](https://test.docker.com/?_gl=1*5gbe9g*_gcl_au*MTgwNzAxODEyLjE3MzA3MjE2MDg.*_ga*MzcyMjU0Nzg4LjE3MzA2OTE5MDk.*_ga_XJWPQMJYHQ*MTczNDYwMDA0NC4xMy4xLjE3MzQ2MDAwNjMuNDEuMC4w)上提供了一个便捷脚本, 用于在 Linux 上安装 Docker 的预发布版本。此脚本与 上的脚本相同`get.docker.com`,但会将您的包管理器配置为使用 Docker 包存储库的测试通道。测试通道包括 Docker 的稳定版本和预发布版本(测试版、候选版本)。使用此脚本可以提前访问新版本,并在发布为稳定版本之前在测试环境中对其进行评估。
|
||||
|
||||
要从测试渠道在 Linux 上安装最新版本的 Docker,请运行:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://test.docker.com -o test-docker.sh
|
||||
sudo sh test-docker.sh
|
||||
```
|
||||
|
||||
#### 使用便捷脚本后升级 Docker
|
||||
如果您使用便捷脚本安装了 Docker,则应直接使用包管理器升级 Docker。重新运行便捷脚本没有任何好处。如果它尝试重新安装主机上已存在的存储库,则重新运行它可能会导致问题。
|
||||
|
||||
## 卸载 Docker Engine
|
||||
1. 卸载 Docker Engine、CLI、containerd 和 Docker Compose 软件包:
|
||||
```bash
|
||||
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
|
||||
```
|
||||
|
||||
2.主机上的镜像、容器、卷或自定义配置文件不会自动删除。要删除所有镜像、容器和卷,请执行以下操作:
|
||||
```bash
|
||||
sudo rm -rf /var/lib/docker
|
||||
sudo rm -rf /var/lib/containerd
|
||||
```
|
||||
|
||||
3. 删除源列表和密钥环
|
||||
```bash
|
||||
sudo rm /etc/apt/sources.list.d/docker.list
|
||||
sudo rm /etc/apt/keyrings/docker.asc
|
||||
```
|
||||
|
||||
您必须手动删除任何已编辑的配置文件。
|
||||
|
||||
## 后续步骤Next steps
|
||||
|
||||
- 继续 [Linux 的安装后步骤](https://docs.docker.com/engine/install/linux-postinstall/)。
|
25
index.md
Normal file
25
index.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# https://vitepress.dev/reference/default-theme-home-page
|
||||
layout: home
|
||||
|
||||
hero:
|
||||
name: "Docker Docs"
|
||||
text: "使用手册"
|
||||
# tagline: My great project tagline
|
||||
actions:
|
||||
- theme: brand
|
||||
text: Markdown Examples
|
||||
link: /docs/engine/index
|
||||
- theme: alt
|
||||
text: API Examples
|
||||
link: /api-examples
|
||||
|
||||
# features:
|
||||
# - title: Feature A
|
||||
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
# - title: Feature B
|
||||
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
# - title: Feature C
|
||||
# details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
|
||||
---
|
||||
|
10
package.json
Normal file
10
package.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitepress": "^1.5.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user