summaryrefslogtreecommitdiff
path: root/docker.txt
diff options
context:
space:
mode:
authorsn4il <sn4il@thedroth.rocks>2023-09-03 09:05:49 +0300
committersn4il <sn4il@thedroth.rocks>2023-09-03 09:05:49 +0300
commit2323e5f8a5e402793b91b0cb5d6d764505f72f35 (patch)
treeea969b2cfef033931ba7b3174348bc001aec34fd /docker.txt
parent7639dab8ca66acec92c40e1264271f897ba46fa3 (diff)
downloadkb-2323e5f8a5e402793b91b0cb5d6d764505f72f35.tar.gz
kb-2323e5f8a5e402793b91b0cb5d6d764505f72f35.zip
Добавить docker.txt
Diffstat (limited to 'docker.txt')
-rw-r--r--docker.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/docker.txt b/docker.txt
new file mode 100644
index 0000000..8676f03
--- /dev/null
+++ b/docker.txt
@@ -0,0 +1,24 @@
+Конвертация контейнера в OCI-формат для запуска через systemd-nspawn
+————————————————————————————————————————————————————————————————————
+
+Нужно:
+https://github.com/containers/skopeo
+https://github.com/opencontainers/image-tools
+---
+
+Что делать:
+
+скачиваем контейнер:
+
+$ skopeo copy docker://alpine:3.18 oci:alpine
+конвертируем в формат OCI bundle:
+
+$ oci-image-tool create --ref platform.os=linux ./alpine ./alpine-bundle
+возможно придется поправить ociVersion в манифесте, т.к. nspawn принимает только 1.0.0:
+
+$ jq '.ociVersion = "1.0.0"' alpine-bundle/config.json
+запускаем:
+
+$ doas systemd-nspawn -x --resolv-conf=bind-host --oci-bundle=$PWD/alpine-bundle
+
+=======================================================================================================