Files
2026-07-09 10:51:54 +00:00

2644 lines
68 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="ru" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="author" content="g.ryzhov">
<link rel="canonical" href="https://SailorUpiter.github.io/mkdocs/%D0%97%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8/%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D1%8B/%D0%A1%D0%BA%D1%80%D0%B8%D0%BF%D1%82%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BA%D0%B8%20Docker/">
<link rel="prev" href="../%D0%A1%D0%B1%D1%80%D0%BE%D1%81%20ip%20%D0%B0%D0%B4%D1%80%D0%B5%D1%81%D0%B0%20%D0%BD%D0%B0%20%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81%D0%B5/">
<link rel="next" href="../%D0%A1%D0%BC%D0%B5%D0%BD%D0%B0%20%D1%85%D0%BE%D1%81%D1%82%D0%BD%D0%B5%D0%B9%D0%BC%D0%B0%20Ubuntu/">
<link rel="icon" href="../../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.6">
<title>notes #comand #linux #docker - Sailor.lab</title>
<link rel="stylesheet" href="../../../assets/stylesheets/main.484c7ddc.min.css">
<link rel="stylesheet" href="../../../assets/stylesheets/palette.ab4e12ef.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("../../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
<script id="__analytics">function __md_analytics(){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config","G-WJRFTNJP0B"),document.addEventListener("DOMContentLoaded",(function(){document.forms.search&&document.forms.search.query.addEventListener("blur",(function(){this.value&&e("event","search",{search_term:this.value})}));document$.subscribe((function(){var t=document.forms.feedback;if(void 0!==t)for(var a of t.querySelectorAll("[type=submit]"))a.addEventListener("click",(function(a){a.preventDefault();var n=document.location.pathname,d=this.getAttribute("data-md-value");e("event","feedback",{page:n,data:d}),t.firstElementChild.disabled=!0;var r=t.querySelector(".md-feedback__note [data-md-value='"+d+"']");r&&(r.hidden=!1)})),t.hidden=!1})),location$.subscribe((function(t){e("config","G-WJRFTNJP0B",{page_path:t.pathname})}))}));var t=document.createElement("script");t.async=!0,t.src="https://www.googletagmanager.com/gtag/js?id=G-WJRFTNJP0B",document.getElementById("__analytics").insertAdjacentElement("afterEnd",t)}</script>
<script>"undefined"!=typeof __md_analytics&&__md_analytics()</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#notes-comand-linux-docker" class="md-skip">
Перейти к содержанию
</a>
</div>
<div data-md-component="announce">
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Верхний колонтитул">
<a href="../../.." title="Sailor.lab" class="md-header__button md-logo" aria-label="Sailor.lab" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Sailor.lab
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
notes #comand #linux #docker
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Темное оформление" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Темное оформление" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Светлое оформление" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Светлое оформление" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Поиск" placeholder="Поиск" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Поиск">
<button type="reset" class="md-search__icon md-icon" title="Очистить" aria-label="Очистить" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Инициализация поиска
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
<div class="md-header__source">
<a href="https://github.com/SailorUpiter/mkdocs.git" title="Перейти к репозиторию" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Навигация" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href="../../.." title="Sailor.lab" class="md-nav__button md-logo" aria-label="Sailor.lab" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a>
Sailor.lab
</label>
<div class="md-nav__source">
<a href="https://github.com/SailorUpiter/mkdocs.git" title="Перейти к репозиторию" class="md-source" data-md-component="source">
<div class="md-source__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
</div>
<div class="md-source__repository">
GitHub
</div>
</a>
</div>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../Welcome/" class="md-nav__link">
<span class="md-ellipsis">
Welcome
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="">
<span class="md-ellipsis">
Promts
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Promts
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../promts/opensearch/" class="md-nav__link">
<span class="md-ellipsis">
Opensearch
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="">
<span class="md-ellipsis">
Заметки
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_3">
<span class="md-nav__icon md-icon"></span>
Заметки
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../user-data/" class="md-nav__link">
<span class="md-ellipsis">
User data
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../../%D0%9F%D0%BE%D1%80%D1%82%20%D0%B4%D0%BB%D1%8F%20IMAP/" class="md-nav__link">
<span class="md-ellipsis">
note #imap #mail
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../Ansible/%D0%98%D0%BD%D0%B2%D0%B5%D0%BD%D1%82%D0%B0%D1%80%D1%8C/" class="md-nav__link">
<span class="md-ellipsis">
Ansible
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../docker/%D0%97%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8%20%D0%BF%D0%BE%20docker/" class="md-nav__link">
<span class="md-ellipsis">
Docker
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../gitea/backup/" class="md-nav__link">
<span class="md-ellipsis">
Gitea
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../markdown/syntax/" class="md-nav__link">
<span class="md-ellipsis">
Markdown
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../openshearch/install/" class="md-nav__link">
<span class="md-ellipsis">
Openshearch
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../proxmox/K8S%20%D1%87%D0%B5%D1%80%D0%B5%D0%B7%20%D1%82%D0%BE%D1%84%D1%83%20%D0%BD%D0%B0%20%D0%BF%D1%80%D0%BE%D0%BA%D1%81%D0%B5/" class="md-nav__link">
<span class="md-ellipsis">
Proxmox
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../terraform/modules/" class="md-nav__link">
<span class="md-ellipsis">
Terraform
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../vault/vault/" class="md-nav__link">
<span class="md-ellipsis">
Vault
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%93%D0%BE%D1%80%D1%8F%D1%87%D0%B8%D0%B5%20%D0%BA%D0%BB%D0%B0%D0%B2%D0%B8%D1%88%D0%B8/vscode/" class="md-nav__link">
<span class="md-ellipsis">
Горячие клавиши
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3_12" checked>
<label class="md-nav__link" for="__nav_3_12" id="__nav_3_12_label" tabindex="0">
<span class="md-ellipsis">
Команды
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="2" aria-labelledby="__nav_3_12_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_3_12">
<span class="md-nav__icon md-icon"></span>
Команды
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../FIo/" class="md-nav__link">
<span class="md-ellipsis">
comand #notes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../%D0%9F%D0%BE%D1%81%D0%BC%D0%BE%D1%82%D1%80%D0%B5%D1%82%D1%8C%20%D1%83%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%BB%D0%B5%D0%BD%D0%BD%D1%8B%D0%B5%20%D0%BF%D0%B0%D0%BA%D0%B5%D1%82%D1%8B%20apt/" class="md-nav__link">
<span class="md-ellipsis">
comand #notes #linux
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../%D0%A0%D0%B0%D0%B7%D0%BC%D0%B5%D1%80%20%D0%B4%D0%B8%D1%80%D0%B5%D0%BA%D1%82%D0%BE%D1%80%D0%B8%D0%B8%20Linux/" class="md-nav__link">
<span class="md-ellipsis">
comand #linux #notes
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../%D0%A1%D0%B1%D1%80%D0%BE%D1%81%20ip%20%D0%B0%D0%B4%D1%80%D0%B5%D1%81%D0%B0%20%D0%BD%D0%B0%20%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D1%84%D0%B5%D0%B9%D1%81%D0%B5/" class="md-nav__link">
<span class="md-ellipsis">
comand #notes #linux
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
notes #comand #linux #docker
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../%D0%A1%D0%BC%D0%B5%D0%BD%D0%B0%20%D1%85%D0%BE%D1%81%D1%82%D0%BD%D0%B5%D0%B9%D0%BC%D0%B0%20Ubuntu/" class="md-nav__link">
<span class="md-ellipsis">
comand #notes #linux
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../%D0%A1%D0%BE%D0%B7%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%85%D0%B5%D1%88%20%D0%BF%D0%B0%D1%80%D0%BE%D0%BB%D1%8F%20%D0%B4%D0%BB%D1%8F%20%D0%BA%D0%BB%D0%B0%D1%83%D0%B4%20%D0%B8%D0%BD%D0%B8%D1%82/" class="md-nav__link">
<span class="md-ellipsis">
comand #cloud-init #note
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../Database/%D0%94%D0%B0%D0%BC%D0%BF%20%D0%B1%D0%B0%D0%B7%D1%8B%20%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85%20%D0%B7%D0%B0%D0%B1%D0%B1%D0%B8%D0%BA%D1%81%D0%B0%20%D0%B1%D0%B5%D0%B7%20%D0%B1%D0%BB%D0%BE%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BA%D0%B8%20%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86/" class="md-nav__link">
<span class="md-ellipsis">
Database
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../Iptables/nat%20proxmox%20%28iptables%29/" class="md-nav__link">
<span class="md-ellipsis">
Iptables
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A0%D0%B5%D0%B3%D0%BB%D0%B0%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/%D0%92%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D0%B5%20%D0%B2%20%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%83%20%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%BE%D0%B2/" class="md-nav__link">
<span class="md-ellipsis">
Регламенты
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A1%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0/HP%20ILO/%D0%9E%D1%88%D0%B8%D0%B1%D0%BA%D0%B0%20SD%20%D0%BA%D0%B0%D1%80%D1%82%D1%8B/" class="md-nav__link">
<span class="md-ellipsis">
Сервера
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A1%D0%B5%D1%82%D0%B5%D0%B2%D1%8B%D0%B5%20%D0%B7%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8/BPDUGuard%2C%20STP%2C%20PortFast/" class="md-nav__link">
<span class="md-ellipsis">
Сетевые заметки
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8/%D0%93%D0%B8%D1%82%20%D1%85%D0%B0%D0%B1%20%D1%81%20%D1%81%D0%B5%D0%BB%D1%84%20%D1%85%D0%BE%D1%81%D1%82%D0%B5%D0%B4%20%D0%9F%D0%9E/" class="md-nav__link">
<span class="md-ellipsis">
Ссылки
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A1%D1%82%D0%BE%D1%80%D0%B0%D0%B4%D0%B6%D0%B8/%D0%9F%D1%80%D0%BE%D0%B8%D0%B7%D0%B2%D0%BE%D0%B4%D0%B8%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D1%81%D0%BE%D1%82%D1%8C%20CEPH/" class="md-nav__link">
<span class="md-ellipsis">
Стораджи
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
<li class="md-nav__item md-nav__item--pruned md-nav__item--nested">
<a href="../../%D0%A2%D1%83%D0%BB%D0%B7%D1%8B/%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0%20%D0%BF%D0%BE%D1%87%D1%82%D0%BE%D0%B2%D0%BE%D0%B3%D0%BE%20%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B0/" class="md-nav__link">
<span class="md-ellipsis">
Тулзы
</span>
<span class="md-nav__icon md-icon"></span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="">
<span class="md-ellipsis">
Регламенты
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_4">
<span class="md-nav__icon md-icon"></span>
Регламенты
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../../%D0%A0%D0%B5%D0%B3%D0%BB%D0%B0%D0%BC%D0%B5%D0%BD%D1%82%D1%8B/%D0%A0%D0%B5%D0%B3%D0%BB%D0%B0%D0%BC%D0%B5%D0%BD%D1%82%20%D0%BD%D0%B0%20%D1%81%D1%80%D0%B0%D0%B1%D0%B0%D1%82%D1%8B%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5%20%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%20%D0%BC%D0%BE%D0%BD%D0%B8%D1%82%D0%BE%D1%80%D0%B8%D0%BD%D0%B3%D0%B0./" class="md-nav__link">
<span class="md-ellipsis">
Регламент на срабатывание систем мониторинга.
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Содержание">
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<nav class="md-path" aria-label="Навигация" >
<ol class="md-path__list">
<li class="md-path__item">
<a href="../../user-data/" class="md-path__link">
<span class="md-ellipsis">
Заметки
</span>
</a>
</li>
<li class="md-path__item">
<a href="../FIo/" class="md-path__link">
<span class="md-ellipsis">
Команды
</span>
</a>
</li>
</ol>
</nav>
<article class="md-content__inner md-typeset">
<h1 id="notes-comand-linux-docker">notes #comand #linux #docker</h1>
<div class="highlight"><pre><span></span><code>curl https://get.docker.com | sh -
</code></pre></div>
<div class="highlight"><pre><span></span><code>#!/bin/sh
set -e
# Docker Engine for Linux installation script.
#
# This script is intended as a convenient way to configure docker&#39;s package
# repositories and to install Docker Engine, This script is not recommended
# for production environments. Before running this script, make yourself familiar
# with potential risks and limitations, and refer to the installation manual
# at https://docs.docker.com/engine/install/ for alternative installation methods.
#
# The script:
#
# - Requires `root` or `sudo` privileges to run.
# - Attempts to detect your Linux distribution and version and configure your
# package management system for you.
# - Doesn&#39;t allow you to customize most installation parameters.
# - Installs dependencies and recommendations without asking for confirmation.
# - Installs the latest stable release (by default) of Docker CLI, Docker Engine,
# Docker Buildx, Docker Compose, containerd, and runc. When using this script
# to provision a machine, this may result in unexpected major version upgrades
# of these packages. Always test upgrades in a test environment before
# deploying to your production systems.
# - Isn&#39;t designed to upgrade an existing Docker installation. When using the
# script to update an existing installation, dependencies may not be updated
# to the expected version, resulting in outdated versions.
#
# Source code is available at https://github.com/docker/docker-install/
#
# Usage
# ==============================================================================
#
# To install the latest stable versions of Docker CLI, Docker Engine, and their
# dependencies:
#
# 1. download the script
#
# $ curl -fsSL https://get.docker.com -o install-docker.sh
#
# 2. verify the script&#39;s content
#
# $ cat install-docker.sh
#
# 3. run the script with --dry-run to verify the steps it executes
#
# $ sh install-docker.sh --dry-run
#
# 4. run the script either as root, or using sudo to perform the installation.
#
# $ sudo sh install-docker.sh
#
# Command-line options
# ==============================================================================
#
# --version &lt;VERSION&gt;
# Use the --version option to install a specific version, for example:
#
# $ sudo sh install-docker.sh --version 23.0
#
# --channel &lt;stable|test&gt;
#
# Use the --channel option to install from an alternative installation channel.
# The following example installs the latest versions from the &quot;test&quot; channel,
# which includes pre-releases (alpha, beta, rc):
#
# $ sudo sh install-docker.sh --channel test
#
# Alternatively, use the script at https://test.docker.com, which uses the test
# channel as default.
#
# --mirror &lt;Aliyun|AzureChinaCloud&gt;
#
# Use the --mirror option to install from a mirror supported by this script.
# Available mirrors are &quot;Aliyun&quot; (https://mirrors.aliyun.com/docker-ce), and
# &quot;AzureChinaCloud&quot; (https://mirror.azure.cn/docker-ce), for example:
#
# $ sudo sh install-docker.sh --mirror AzureChinaCloud
#
# ==============================================================================
# Git commit from https://github.com/docker/docker-install when
# the script was uploaded (Should only be modified by upload job):
SCRIPT_COMMIT_SHA=&quot;4c94a56999e10efcf48c5b8e3f6afea464f9108e&quot;
# strip &quot;v&quot; prefix if present
VERSION=&quot;${VERSION#v}&quot;
# The channel to install from:
# * stable
# * test
DEFAULT_CHANNEL_VALUE=&quot;stable&quot;
if [ -z &quot;$CHANNEL&quot; ]; then
CHANNEL=$DEFAULT_CHANNEL_VALUE
fi
DEFAULT_DOWNLOAD_URL=&quot;https://download.docker.com&quot;
if [ -z &quot;$DOWNLOAD_URL&quot; ]; then
DOWNLOAD_URL=$DEFAULT_DOWNLOAD_URL
fi
DEFAULT_REPO_FILE=&quot;docker-ce.repo&quot;
if [ -z &quot;$REPO_FILE&quot; ]; then
REPO_FILE=&quot;$DEFAULT_REPO_FILE&quot;
fi
mirror=&#39;&#39;
DRY_RUN=${DRY_RUN:-}
while [ $# -gt 0 ]; do
case &quot;$1&quot; in
--channel)
CHANNEL=&quot;$2&quot;
shift
;;
--dry-run)
DRY_RUN=1
;;
--mirror)
mirror=&quot;$2&quot;
shift
;;
--version)
VERSION=&quot;${2#v}&quot;
shift
;;
--*)
echo &quot;Illegal option $1&quot;
;;
esac
shift $(( $# &gt; 0 ? 1 : 0 ))
done
case &quot;$mirror&quot; in
Aliyun)
DOWNLOAD_URL=&quot;https://mirrors.aliyun.com/docker-ce&quot;
;;
AzureChinaCloud)
DOWNLOAD_URL=&quot;https://mirror.azure.cn/docker-ce&quot;
;;
&quot;&quot;)
;;
*)
&gt;&amp;2 echo &quot;unknown mirror &#39;$mirror&#39;: use either &#39;Aliyun&#39;, or &#39;AzureChinaCloud&#39;.&quot;
exit 1
;;
esac
case &quot;$CHANNEL&quot; in
stable|test)
;;
*)
&gt;&amp;2 echo &quot;unknown CHANNEL &#39;$CHANNEL&#39;: use either stable or test.&quot;
exit 1
;;
esac
command_exists() {
command -v &quot;$@&quot; &gt; /dev/null 2&gt;&amp;1
}
# version_gte checks if the version specified in $VERSION is at least the given
# SemVer (Maj.Minor[.Patch]), or CalVer (YY.MM) version.It returns 0 (success)
# if $VERSION is either unset (=latest) or newer or equal than the specified
# version, or returns 1 (fail) otherwise.
#
# examples:
#
# VERSION=23.0
# version_gte 23.0 // 0 (success)
# version_gte 20.10 // 0 (success)
# version_gte 19.03 // 0 (success)
# version_gte 26.1 // 1 (fail)
version_gte() {
if [ -z &quot;$VERSION&quot; ]; then
return 0
fi
version_compare &quot;$VERSION&quot; &quot;$1&quot;
}
# version_compare compares two version strings (either SemVer (Major.Minor.Path),
# or CalVer (YY.MM) version strings. It returns 0 (success) if version A is newer
# or equal than version B, or 1 (fail) otherwise. Patch releases and pre-release
# (-alpha/-beta) are not taken into account
#
# examples:
#
# version_compare 23.0.0 20.10 // 0 (success)
# version_compare 23.0 20.10 // 0 (success)
# version_compare 20.10 19.03 // 0 (success)
# version_compare 20.10 20.10 // 0 (success)
# version_compare 19.03 20.10 // 1 (fail)
version_compare() (
set +x
yy_a=&quot;$(echo &quot;$1&quot; | cut -d&#39;.&#39; -f1)&quot;
yy_b=&quot;$(echo &quot;$2&quot; | cut -d&#39;.&#39; -f1)&quot;
if [ &quot;$yy_a&quot; -lt &quot;$yy_b&quot; ]; then
return 1
fi
if [ &quot;$yy_a&quot; -gt &quot;$yy_b&quot; ]; then
return 0
fi
mm_a=&quot;$(echo &quot;$1&quot; | cut -d&#39;.&#39; -f2)&quot;
mm_b=&quot;$(echo &quot;$2&quot; | cut -d&#39;.&#39; -f2)&quot;
# trim leading zeros to accommodate CalVer
mm_a=&quot;${mm_a#0}&quot;
mm_b=&quot;${mm_b#0}&quot;
if [ &quot;${mm_a:-0}&quot; -lt &quot;${mm_b:-0}&quot; ]; then
return 1
fi
return 0
)
is_dry_run() {
if [ -z &quot;$DRY_RUN&quot; ]; then
return 1
else
return 0
fi
}
is_wsl() {
case &quot;$(uname -r)&quot; in
*microsoft* ) true ;; # WSL 2
*Microsoft* ) true ;; # WSL 1
* ) false;;
esac
}
is_darwin() {
case &quot;$(uname -s)&quot; in
*darwin* ) true ;;
*Darwin* ) true ;;
* ) false;;
esac
}
deprecation_notice() {
distro=$1
distro_version=$2
echo
printf &quot;\033[91;1mDEPRECATION WARNING\033[0m\n&quot;
printf &quot; This Linux distribution (\033[1m%s %s\033[0m) reached end-of-life and is no longer supported by this script.\n&quot; &quot;$distro&quot; &quot;$distro_version&quot;
echo &quot; No updates or security fixes will be released for this distribution, and users are recommended&quot;
echo &quot; to upgrade to a currently maintained version of $distro.&quot;
echo
printf &quot;Press \033[1mCtrl+C\033[0m now to abort this script, or wait for the installation to continue.&quot;
echo
sleep 10
}
get_distribution() {
lsb_dist=&quot;&quot;
# Every system that we officially support has /etc/os-release
if [ -r /etc/os-release ]; then
lsb_dist=&quot;$(. /etc/os-release &amp;&amp; echo &quot;$ID&quot;)&quot;
fi
# Returning an empty string here should be alright since the
# case statements don&#39;t act unless you provide an actual value
echo &quot;$lsb_dist&quot;
}
echo_docker_as_nonroot() {
if is_dry_run; then
return
fi
if command_exists docker &amp;&amp; [ -e /var/run/docker.sock ]; then
(
set -x
$sh_c &#39;docker version&#39;
) || true
fi
# intentionally mixed spaces and tabs here -- tabs are stripped by &quot;&lt;&lt;-EOF&quot;, spaces are kept in the output
echo
echo &quot;================================================================================&quot;
echo
if version_gte &quot;20.10&quot;; then
echo &quot;To run Docker as a non-privileged user, consider setting up the&quot;
echo &quot;Docker daemon in rootless mode for your user:&quot;
echo
echo &quot; dockerd-rootless-setuptool.sh install&quot;
echo
echo &quot;Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.&quot;
echo
fi
echo
echo &quot;To run the Docker daemon as a fully privileged service, but granting non-root&quot;
echo &quot;users access, refer to https://docs.docker.com/go/daemon-access/&quot;
echo
echo &quot;WARNING: Access to the remote API on a privileged Docker daemon is equivalent&quot;
echo &quot; to root access on the host. Refer to the &#39;Docker daemon attack surface&#39;&quot;
echo &quot; documentation for details: https://docs.docker.com/go/attack-surface/&quot;
echo
echo &quot;================================================================================&quot;
echo
}
# Check if this is a forked Linux distro
check_forked() {
# Check for lsb_release command existence, it usually exists in forked distros
if command_exists lsb_release; then
# Check if the `-u` option is supported
set +e
lsb_release -a -u &gt; /dev/null 2&gt;&amp;1
lsb_release_exit_code=$?
set -e
# Check if the command has exited successfully, it means we&#39;re in a forked distro
if [ &quot;$lsb_release_exit_code&quot; = &quot;0&quot; ]; then
# Print info about current distro
cat &lt;&lt;-EOF
You&#39;re using &#39;$lsb_dist&#39; version &#39;$dist_version&#39;.
EOF
# Get the upstream release info
lsb_dist=$(lsb_release -a -u 2&gt;&amp;1 | tr &#39;[:upper:]&#39; &#39;[:lower:]&#39; | grep -E &#39;id&#39; | cut -d &#39;:&#39; -f 2 | tr -d &#39;[:space:]&#39;)
dist_version=$(lsb_release -a -u 2&gt;&amp;1 | tr &#39;[:upper:]&#39; &#39;[:lower:]&#39; | grep -E &#39;codename&#39; | cut -d &#39;:&#39; -f 2 | tr -d &#39;[:space:]&#39;)
# Print info about upstream distro
cat &lt;&lt;-EOF
Upstream release is &#39;$lsb_dist&#39; version &#39;$dist_version&#39;.
EOF
else
if [ -r /etc/debian_version ] &amp;&amp; [ &quot;$lsb_dist&quot; != &quot;ubuntu&quot; ] &amp;&amp; [ &quot;$lsb_dist&quot; != &quot;raspbian&quot; ]; then
if [ &quot;$lsb_dist&quot; = &quot;osmc&quot; ]; then
# OSMC runs Raspbian
lsb_dist=raspbian
else
# We&#39;re Debian and don&#39;t even know it!
lsb_dist=debian
fi
dist_version=&quot;$(sed &#39;s/\/.*//&#39; /etc/debian_version | sed &#39;s/\..*//&#39;)&quot;
case &quot;$dist_version&quot; in
12)
dist_version=&quot;bookworm&quot;
;;
11)
dist_version=&quot;bullseye&quot;
;;
10)
dist_version=&quot;buster&quot;
;;
9)
dist_version=&quot;stretch&quot;
;;
8)
dist_version=&quot;jessie&quot;
;;
esac
fi
fi
fi
}
do_install() {
echo &quot;# Executing docker install script, commit: $SCRIPT_COMMIT_SHA&quot;
if command_exists docker; then
cat &gt;&amp;2 &lt;&lt;-&#39;EOF&#39;
Warning: the &quot;docker&quot; command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we&#39;re displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can ignore this message, but be aware that the
script resets any custom changes in the deb and rpm repo configuration
files to match the parameters passed to the script.
You may press Ctrl+C now to abort this script.
EOF
( set -x; sleep 20 )
fi
user=&quot;$(id -un 2&gt;/dev/null || true)&quot;
sh_c=&#39;sh -c&#39;
if [ &quot;$user&quot; != &#39;root&#39; ]; then
if command_exists sudo; then
sh_c=&#39;sudo -E sh -c&#39;
elif command_exists su; then
sh_c=&#39;su -c&#39;
else
cat &gt;&amp;2 &lt;&lt;-&#39;EOF&#39;
Error: this installer needs the ability to run commands as root.
We are unable to find either &quot;sudo&quot; or &quot;su&quot; available to make this happen.
EOF
exit 1
fi
fi
if is_dry_run; then
sh_c=&quot;echo&quot;
fi
# perform some very rudimentary platform detection
lsb_dist=$( get_distribution )
lsb_dist=&quot;$(echo &quot;$lsb_dist&quot; | tr &#39;[:upper:]&#39; &#39;[:lower:]&#39;)&quot;
if is_wsl; then
echo
echo &quot;WSL DETECTED: We recommend using Docker Desktop for Windows.&quot;
echo &quot;Please get Docker Desktop from https://www.docker.com/products/docker-desktop/&quot;
echo
cat &gt;&amp;2 &lt;&lt;-&#39;EOF&#39;
You may press Ctrl+C now to abort this script.
EOF
( set -x; sleep 20 )
fi
case &quot;$lsb_dist&quot; in
ubuntu)
if command_exists lsb_release; then
dist_version=&quot;$(lsb_release --codename | cut -f2)&quot;
fi
if [ -z &quot;$dist_version&quot; ] &amp;&amp; [ -r /etc/lsb-release ]; then
dist_version=&quot;$(. /etc/lsb-release &amp;&amp; echo &quot;$DISTRIB_CODENAME&quot;)&quot;
fi
;;
debian|raspbian)
dist_version=&quot;$(sed &#39;s/\/.*//&#39; /etc/debian_version | sed &#39;s/\..*//&#39;)&quot;
case &quot;$dist_version&quot; in
12)
dist_version=&quot;bookworm&quot;
;;
11)
dist_version=&quot;bullseye&quot;
;;
10)
dist_version=&quot;buster&quot;
;;
9)
dist_version=&quot;stretch&quot;
;;
8)
dist_version=&quot;jessie&quot;
;;
esac
;;
centos|rhel)
if [ -z &quot;$dist_version&quot; ] &amp;&amp; [ -r /etc/os-release ]; then
dist_version=&quot;$(. /etc/os-release &amp;&amp; echo &quot;$VERSION_ID&quot;)&quot;
fi
;;
*)
if command_exists lsb_release; then
dist_version=&quot;$(lsb_release --release | cut -f2)&quot;
fi
if [ -z &quot;$dist_version&quot; ] &amp;&amp; [ -r /etc/os-release ]; then
dist_version=&quot;$(. /etc/os-release &amp;&amp; echo &quot;$VERSION_ID&quot;)&quot;
fi
;;
esac
# Check if this is a forked Linux distro
check_forked
# Print deprecation warnings for distro versions that recently reached EOL,
# but may still be commonly used (especially LTS versions).
case &quot;$lsb_dist.$dist_version&quot; in
centos.8|centos.7|rhel.7)
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
;;
debian.buster|debian.stretch|debian.jessie)
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
;;
raspbian.buster|raspbian.stretch|raspbian.jessie)
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
;;
ubuntu.bionic|ubuntu.xenial|ubuntu.trusty)
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
;;
ubuntu.mantic|ubuntu.lunar|ubuntu.kinetic|ubuntu.impish|ubuntu.hirsute|ubuntu.groovy|ubuntu.eoan|ubuntu.disco|ubuntu.cosmic)
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
;;
fedora.*)
if [ &quot;$dist_version&quot; -lt 40 ]; then
deprecation_notice &quot;$lsb_dist&quot; &quot;$dist_version&quot;
fi
;;
esac
# Run setup for each distro accordingly
case &quot;$lsb_dist&quot; in
ubuntu|debian|raspbian)
pre_reqs=&quot;ca-certificates curl&quot;
apt_repo=&quot;deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] $DOWNLOAD_URL/linux/$lsb_dist $dist_version $CHANNEL&quot;
(
if ! is_dry_run; then
set -x
fi
$sh_c &#39;apt-get -qq update &gt;/dev/null&#39;
$sh_c &quot;DEBIAN_FRONTEND=noninteractive apt-get -y -qq install $pre_reqs &gt;/dev/null&quot;
$sh_c &#39;install -m 0755 -d /etc/apt/keyrings&#39;
$sh_c &quot;curl -fsSL \&quot;$DOWNLOAD_URL/linux/$lsb_dist/gpg\&quot; -o /etc/apt/keyrings/docker.asc&quot;
$sh_c &quot;chmod a+r /etc/apt/keyrings/docker.asc&quot;
$sh_c &quot;echo \&quot;$apt_repo\&quot; &gt; /etc/apt/sources.list.d/docker.list&quot;
$sh_c &#39;apt-get -qq update &gt;/dev/null&#39;
)
pkg_version=&quot;&quot;
if [ -n &quot;$VERSION&quot; ]; then
if is_dry_run; then
echo &quot;# WARNING: VERSION pinning is not supported in DRY_RUN&quot;
else
# Will work for incomplete versions IE (17.12), but may not actually grab the &quot;latest&quot; if in the test channel
pkg_pattern=&quot;$(echo &quot;$VERSION&quot; | sed &#39;s/-ce-/~ce~.*/g&#39; | sed &#39;s/-/.*/g&#39;)&quot;
search_command=&quot;apt-cache madison docker-ce | grep &#39;$pkg_pattern&#39; | head -1 | awk &#39;{\$1=\$1};1&#39; | cut -d&#39; &#39; -f 3&quot;
pkg_version=&quot;$($sh_c &quot;$search_command&quot;)&quot;
echo &quot;INFO: Searching repository for VERSION &#39;$VERSION&#39;&quot;
echo &quot;INFO: $search_command&quot;
if [ -z &quot;$pkg_version&quot; ]; then
echo
echo &quot;ERROR: &#39;$VERSION&#39; not found amongst apt-cache madison results&quot;
echo
exit 1
fi
if version_gte &quot;18.09&quot;; then
search_command=&quot;apt-cache madison docker-ce-cli | grep &#39;$pkg_pattern&#39; | head -1 | awk &#39;{\$1=\$1};1&#39; | cut -d&#39; &#39; -f 3&quot;
echo &quot;INFO: $search_command&quot;
cli_pkg_version=&quot;=$($sh_c &quot;$search_command&quot;)&quot;
fi
pkg_version=&quot;=$pkg_version&quot;
fi
fi
(
pkgs=&quot;docker-ce${pkg_version%=}&quot;
if version_gte &quot;18.09&quot;; then
# older versions didn&#39;t ship the cli and containerd as separate packages
pkgs=&quot;$pkgs docker-ce-cli${cli_pkg_version%=} containerd.io&quot;
fi
if version_gte &quot;20.10&quot;; then
pkgs=&quot;$pkgs docker-compose-plugin docker-ce-rootless-extras$pkg_version&quot;
fi
if version_gte &quot;23.0&quot;; then
pkgs=&quot;$pkgs docker-buildx-plugin&quot;
fi
if ! is_dry_run; then
set -x
fi
$sh_c &quot;DEBIAN_FRONTEND=noninteractive apt-get -y -qq install $pkgs &gt;/dev/null&quot;
)
echo_docker_as_nonroot
exit 0
;;
centos|fedora|rhel)
repo_file_url=&quot;$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE&quot;
(
if ! is_dry_run; then
set -x
fi
if command_exists dnf5; then
$sh_c &quot;dnf -y -q --setopt=install_weak_deps=False install dnf-plugins-core&quot;
$sh_c &quot;dnf5 config-manager addrepo --overwrite --save-filename=docker-ce.repo --from-repofile=&#39;$repo_file_url&#39;&quot;
if [ &quot;$CHANNEL&quot; != &quot;stable&quot; ]; then
$sh_c &quot;dnf5 config-manager setopt \&quot;docker-ce-*.enabled=0\&quot;&quot;
$sh_c &quot;dnf5 config-manager setopt \&quot;docker-ce-$CHANNEL.enabled=1\&quot;&quot;
fi
$sh_c &quot;dnf makecache&quot;
elif command_exists dnf; then
$sh_c &quot;dnf -y -q --setopt=install_weak_deps=False install dnf-plugins-core&quot;
$sh_c &quot;rm -f /etc/yum.repos.d/docker-ce.repo /etc/yum.repos.d/docker-ce-staging.repo&quot;
$sh_c &quot;dnf config-manager --add-repo $repo_file_url&quot;
if [ &quot;$CHANNEL&quot; != &quot;stable&quot; ]; then
$sh_c &quot;dnf config-manager --set-disabled \&quot;docker-ce-*\&quot;&quot;
$sh_c &quot;dnf config-manager --set-enabled \&quot;docker-ce-$CHANNEL\&quot;&quot;
fi
$sh_c &quot;dnf makecache&quot;
else
$sh_c &quot;yum -y -q install yum-utils&quot;
$sh_c &quot;rm -f /etc/yum.repos.d/docker-ce.repo /etc/yum.repos.d/docker-ce-staging.repo&quot;
$sh_c &quot;yum-config-manager --add-repo $repo_file_url&quot;
if [ &quot;$CHANNEL&quot; != &quot;stable&quot; ]; then
$sh_c &quot;yum-config-manager --disable \&quot;docker-ce-*\&quot;&quot;
$sh_c &quot;yum-config-manager --enable \&quot;docker-ce-$CHANNEL\&quot;&quot;
fi
$sh_c &quot;yum makecache&quot;
fi
)
pkg_version=&quot;&quot;
if command_exists dnf; then
pkg_manager=&quot;dnf&quot;
pkg_manager_flags=&quot;-y -q --best&quot;
else
pkg_manager=&quot;yum&quot;
pkg_manager_flags=&quot;-y -q&quot;
fi
if [ -n &quot;$VERSION&quot; ]; then
if is_dry_run; then
echo &quot;# WARNING: VERSION pinning is not supported in DRY_RUN&quot;
else
if [ &quot;$lsb_dist&quot; = &quot;fedora&quot; ]; then
pkg_suffix=&quot;fc$dist_version&quot;
else
pkg_suffix=&quot;el&quot;
fi
pkg_pattern=&quot;$(echo &quot;$VERSION&quot; | sed &#39;s/-ce-/\\\\.ce.*/g&#39; | sed &#39;s/-/.*/g&#39;).*$pkg_suffix&quot;
search_command=&quot;$pkg_manager list --showduplicates docker-ce | grep &#39;$pkg_pattern&#39; | tail -1 | awk &#39;{print \$2}&#39;&quot;
pkg_version=&quot;$($sh_c &quot;$search_command&quot;)&quot;
echo &quot;INFO: Searching repository for VERSION &#39;$VERSION&#39;&quot;
echo &quot;INFO: $search_command&quot;
if [ -z &quot;$pkg_version&quot; ]; then
echo
echo &quot;ERROR: &#39;$VERSION&#39; not found amongst $pkg_manager list results&quot;
echo
exit 1
fi
if version_gte &quot;18.09&quot;; then
# older versions don&#39;t support a cli package
search_command=&quot;$pkg_manager list --showduplicates docker-ce-cli | grep &#39;$pkg_pattern&#39; | tail -1 | awk &#39;{print \$2}&#39;&quot;
cli_pkg_version=&quot;$($sh_c &quot;$search_command&quot; | cut -d&#39;:&#39; -f 2)&quot;
fi
# Cut out the epoch and prefix with a &#39;-&#39;
pkg_version=&quot;-$(echo &quot;$pkg_version&quot; | cut -d&#39;:&#39; -f 2)&quot;
fi
fi
(
pkgs=&quot;docker-ce$pkg_version&quot;
if version_gte &quot;18.09&quot;; then
# older versions didn&#39;t ship the cli and containerd as separate packages
if [ -n &quot;$cli_pkg_version&quot; ]; then
pkgs=&quot;$pkgs docker-ce-cli-$cli_pkg_version containerd.io&quot;
else
pkgs=&quot;$pkgs docker-ce-cli containerd.io&quot;
fi
fi
if version_gte &quot;20.10&quot;; then
pkgs=&quot;$pkgs docker-compose-plugin docker-ce-rootless-extras$pkg_version&quot;
fi
if version_gte &quot;23.0&quot;; then
pkgs=&quot;$pkgs docker-buildx-plugin&quot;
fi
if ! is_dry_run; then
set -x
fi
$sh_c &quot;$pkg_manager $pkg_manager_flags install $pkgs&quot;
)
echo_docker_as_nonroot
exit 0
;;
sles)
if [ &quot;$(uname -m)&quot; != &quot;s390x&quot; ]; then
echo &quot;Packages for SLES are currently only available for s390x&quot;
exit 1
fi
repo_file_url=&quot;$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE&quot;
pre_reqs=&quot;ca-certificates curl libseccomp2 awk&quot;
(
if ! is_dry_run; then
set -x
fi
$sh_c &quot;zypper install -y $pre_reqs&quot;
$sh_c &quot;rm -f /etc/zypp/repos.d/docker-ce-*.repo&quot;
$sh_c &quot;zypper addrepo $repo_file_url&quot;
opensuse_factory_url=&quot;https://download.opensuse.org/repositories/security:/SELinux/openSUSE_Factory/&quot;
if ! zypper lr -d | grep -q &quot;${opensuse_factory_url}&quot;; then
opensuse_repo=&quot;${opensuse_factory_url}security:SELinux.repo&quot;
if ! is_dry_run; then
cat &gt;&amp;2 &lt;&lt;- EOF
WARNING!!
openSUSE repository ($opensuse_repo) will be enabled now.
Do you wish to continue?
You may press Ctrl+C now to abort this script.
EOF
( set -x; sleep 20 )
fi
$sh_c &quot;zypper addrepo $opensuse_repo&quot;
fi
$sh_c &quot;zypper --gpg-auto-import-keys refresh&quot;
$sh_c &quot;zypper lr -d&quot;
)
pkg_version=&quot;&quot;
if [ -n &quot;$VERSION&quot; ]; then
if is_dry_run; then
echo &quot;# WARNING: VERSION pinning is not supported in DRY_RUN&quot;
else
pkg_pattern=&quot;$(echo &quot;$VERSION&quot; | sed &#39;s/-ce-/\\\\.ce.*/g&#39; | sed &#39;s/-/.*/g&#39;)&quot;
search_command=&quot;zypper search -s --match-exact &#39;docker-ce&#39; | grep &#39;$pkg_pattern&#39; | tail -1 | awk &#39;{print \$6}&#39;&quot;
pkg_version=&quot;$($sh_c &quot;$search_command&quot;)&quot;
echo &quot;INFO: Searching repository for VERSION &#39;$VERSION&#39;&quot;
echo &quot;INFO: $search_command&quot;
if [ -z &quot;$pkg_version&quot; ]; then
echo
echo &quot;ERROR: &#39;$VERSION&#39; not found amongst zypper list results&quot;
echo
exit 1
fi
search_command=&quot;zypper search -s --match-exact &#39;docker-ce-cli&#39; | grep &#39;$pkg_pattern&#39; | tail -1 | awk &#39;{print \$6}&#39;&quot;
# It&#39;s okay for cli_pkg_version to be blank, since older versions don&#39;t support a cli package
cli_pkg_version=&quot;$($sh_c &quot;$search_command&quot;)&quot;
pkg_version=&quot;-$pkg_version&quot;
fi
fi
(
pkgs=&quot;docker-ce$pkg_version&quot;
if version_gte &quot;18.09&quot;; then
if [ -n &quot;$cli_pkg_version&quot; ]; then
# older versions didn&#39;t ship the cli and containerd as separate packages
pkgs=&quot;$pkgs docker-ce-cli-$cli_pkg_version containerd.io&quot;
else
pkgs=&quot;$pkgs docker-ce-cli containerd.io&quot;
fi
fi
if version_gte &quot;20.10&quot;; then
pkgs=&quot;$pkgs docker-compose-plugin docker-ce-rootless-extras$pkg_version&quot;
fi
if version_gte &quot;23.0&quot;; then
pkgs=&quot;$pkgs docker-buildx-plugin&quot;
fi
if ! is_dry_run; then
set -x
fi
$sh_c &quot;zypper -q install -y $pkgs&quot;
)
echo_docker_as_nonroot
exit 0
;;
*)
if [ -z &quot;$lsb_dist&quot; ]; then
if is_darwin; then
echo
echo &quot;ERROR: Unsupported operating system &#39;macOS&#39;&quot;
echo &quot;Please get Docker Desktop from https://www.docker.com/products/docker-desktop&quot;
echo
exit 1
fi
fi
echo
echo &quot;ERROR: Unsupported distribution &#39;$lsb_dist&#39;&quot;
echo
exit 1
;;
esac
exit 1
}
# wrapped up in a function so that we have some protection against only getting
# half the file during &quot;curl | sh&quot;
do_install
</code></pre></div>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
К началу
</button>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
<div class="md-copyright__highlight">
Sailor.lab, 2026
</div>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<div class="md-progress" data-md-component="progress" role="progressbar"></div>
<script id="__config" type="application/json">{"annotate": null, "base": "../../..", "features": ["content.code.copy", "navigation.instant", "navigation.instant.progress", "navigation.sections", "navigation.path", "navigation.top", "navigation.prune"], "search": "../../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "\u0421\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0431\u0443\u0444\u0435\u0440", "clipboard.copy": "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440", "search.result.more.one": "\u0415\u0449\u0451 1 \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435", "search.result.more.other": "\u0415\u0449\u0451 # \u043d\u0430 \u044d\u0442\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435", "search.result.none": "\u0421\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e", "search.result.one": "\u041d\u0430\u0439\u0434\u0435\u043d\u043e 1 \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0435", "search.result.other": "\u041d\u0430\u0439\u0434\u0435\u043d\u043e \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u0439: #", "search.result.placeholder": "\u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430", "search.result.term.missing": "\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442", "select.version": "\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0435\u0440\u0441\u0438\u044e"}, "version": null}</script>
<script src="../../../assets/javascripts/bundle.79ae519e.min.js"></script>
</body>
</html>