Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
system:docker [2019/07/30 10:44] – [Документация / Статьи] mirocowsystem:docker [2025/01/22 18:24] (текущий) 192.168.1.104
Строка 5: Строка 5:
 {{https://habrastorage.org/files/67f/73a/551/67f73a551a254c19854adf3b4665a7bb.png?300}} {{https://habrastorage.org/files/67f/73a/551/67f73a551a254c19854adf3b4665a7bb.png?300}}
  
-| VIRTUAL MACHINES                                                                                                                                                  | CONTAINERS                                                                                                                                                                                                                                                                                                       | 
-| Virtual machines include the application, the necessary binaries and libraries, and an entire guest operating system -- all of which can amount to tens of GBs.   | Containers include the application and all of its dependencies --but share the kernel with other containers, running as isolated processes in user space on the host operating system. Docker containers are not tied to any specific infrastructure: they run on any computer, on any infrastructure, and in any cloud.   | 
  
 ====== Установка ====== ====== Установка ======
  
-  * [[https://docs.docker.com/docker-for-mac/edge-release-notes/|Docker for Mac Edge]] +===== Ubuntu =====
-  * [[https://docs.docker.com/install/linux/docker-ce/debian/|Docker for Debian]]+
  
-nano /etc/apt/sources.list +<code bash> 
-<code> +$ apt update && \ 
- deb https://apt.dockerproject.org/repo debian-stretch main+apt install ca-certificates curl gnupg lsb-release -y && \ 
 +mkdir -p /etc/apt/keyrings && \ 
 +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ 
 +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ 
 +apt update && \ 
 +apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
 </code> </code>
 +
 +===== Debian =====
 +
 +<code bash>
 +$ apt update && \
 +apt install ca-certificates curl gnupg lsb-release -y && \
 +mkdir -p /etc/apt/keyrings && \
 +curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc && \
 +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
 +apt update && \
 +apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
 +</code>
 +
 +====== Docker ======
 +
 +<code bash>
 +$ sudo groupadd docker
 +$ sudo usermod -aG docker $USER
 +$ newgrp docker
 +</code>
 +
 +====== UI ======
 +
 +  * https://github.com/DockStation/dockstation :!:
 +  * https://github.com/felixgborrego/simple-docker-ui :!:
 +  * https://github.com/docker/kitematic
 +  * https://github.com/bcicen/ctop
 +  * https://github.com/portainer/portainer
 +  * https://github.com/kubernetes/kubernetes
  
 ===== Использование ===== ===== Использование =====
 +
 +  * [[Dockerfile]]
 +  * [[docker-compose.yml]]
  
 ==== Работа с образами / Images ==== ==== Работа с образами / Images ====
Строка 82: Строка 116:
 yii2_mariadb                 latest              03ddc39bcf15        27 hours ago        204MB yii2_mariadb                 latest              03ddc39bcf15        27 hours ago        204MB
 </code> </code>
 +
 +=== Получение образов ===
 +
 +<note tip>Для справки \\ <code bash>
 +$ docker save vorobev4/mule-runtime-ee:v3-4.4.0 > /tmp/mule-runtime-ee.tar
 +</code></note>
 +
 +=== Установка образа ===
 +
 +<note tip>Для справки \\ <code bash>
 +$ docker load /tmp/mule-runtime-ee.tar
 +</code></note>
  
 ==== Работа с контейнерами / Containers ==== ==== Работа с контейнерами / Containers ====
Строка 92: Строка 138:
 === Запуск контейнера === === Запуск контейнера ===
  
-<note tip>Необходим Dockerfile</note>+<note important>Необходим Dockerfile</note>
  
 <code bash>$ docker up</code> <code bash>$ docker up</code>
Строка 473: Строка 519:
   * https://linux-notes.org/rabota-s-tomami-volumes-v-docker/   * https://linux-notes.org/rabota-s-tomami-volumes-v-docker/
  
-====== Другие системы виртуализации ======+====== Ссылки ======
  
-{{topic>[virtual]}}+{{topic>[docker]}}