|
|||||||
Docker-SAV
Время создания: 06.03.2021 11:17
Автор: alensav
Текстовые метки: docker
Раздел: DOCKER_SAV
Запись: alensav/MyTetra2/main/base/1615018648yl3z20a5iu/text.html на raw.githubusercontent.com
|
|||||||
|
|||||||
172.30.0.Docker-SAV LXD Ваш первый LXD контейнер Справка по LXD/LXC ========================================== alensav@alensav-965P-DS3P:~$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE 32bit/ubuntu bionic 9d2418ef8d3a 13 minutes ago 437MB --------------------------------------------------------------------------------------------------------- ============================ 1625 sudo lxc-start -n test-ubuntu -f /var/lib/lxc/test-alpine/config -d sudo lxc-start -n test-centos -f /var/lib/lxc/test-centos/config -d 1611 sudo lxc-attach test-ubuntu 1626 sudo lxc-attach test-alpine sudo lxc-attach test-centos 1612 sudo lxc-stop test-ubuntu 1613 lxc-ls -f -------------------------------------------------------------------------------------------- sudo lxc-start -n SAV-centos -f /var/lib/lxc/SAV-centos/config -d * aarch lxc-start -n SAV-centos -d sudo lxc-start -n SAV-centos /sbin/init loglevel=debug Для получения отладочной информации LXC, используйте -o filename -l debuglevel, например: sudo lxc-start -o lxc.debug -l DEBUG -n SAV-centos
-------------------------------------------------------
Для регистрации автоматического запуска контейнера, создайте символическую ссылку /etc/default/lxc/name.conf, указывающую на конфигурационный файл контейнера. Например, конфигурационный файл для контейнера CN - /var/lib/lxc/CN/config. Чтобы автоматически запускать этот контейнер, используйте команду:
sudo ln -s /var/lib/lxc/SAV-centos/config /etc/lxc/auto/SAV-centos.conf
-------------------------------------------------------------------------------------------------------- root@test-ubuntu:/# ifconfig UBUNTU eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.30.0.196 netmask 255.255.255.0 broadcast 172.30.0.255 inet6 fe80::216:3eff:fe81:c9a9 prefixlen 64 scopeid 0x20<link> ether 00:16:3e:81:c9:a9 txqueuelen 1000 (Ethernet) RX packets 54 bytes 10414 (10.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 19 bytes 2201 (2.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ----------------------------------------------------------------------------------- Name: test-centos State: RUNNING PID: 10929 IP: 172.30.0.247 CPU use: 1.34 seconds BlkIO use: 27.02 MiB Memory use: 39.15 MiB KMem use: 0 bytes Link: veth8Mq7k8 TX bytes: 4.70 KiB RX bytes: 13.90 KiB Total bytes: 18.60 KiB ======================================================= LXD config: {} networks: - config: ipv4.address: auto ipv6.address: auto description: "" name: lxdbr0 type: "" project: default storage_pools: - config: size: 5GB description: "" name: mypool driver: btrfs profiles: - config: {} description: "" devices: eth0: name: eth0 network: lxdbr0 type: nic root: path: / pool: mypool type: disk name: default cluster: null ================================================== alensav@alensav-965P-DS3P:~$ lxc image list +-------+--------------+--------+--------------------------------+--------------+-----------+---------+-----------------------------+ | ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE | +-------+--------------+--------+--------------------------------+--------------+-----------+---------+-----------------------------+ | | 8b0b414d9fc2 | no | Centos 7 i386 (20210306_14:07) | i686 | CONTAINER | 84.11MB | Mar 8, 2021 at 9:50am (UTC) | +-------+--------------+--------+--------------------------------+--------------+-----------+---------+-----------------------------+ -------------------------------------------------------------------------------------------------------------------------------------- alensav@alensav-965P-DS3P:~$ lxc image info 8b0b414d9fc2 Fingerprint: 8b0b414d9fc28f6a660083ba08e69c49995c652ab4ad24cea13b37acba382732 Size: 84.11MB Architecture: i686 Type: container Public: no Timestamps: Created: 2021/03/06 00:00 UTC Uploaded: 2021/03/08 09:50 UTC Expires: never Last used: 2021/03/08 09:50 UTC Properties: serial: 20210306_14:07 type: squashfs variant: default architecture: i386 description: Centos 7 i386 (20210306_14:07) os: Centos release: 7 Aliases: Cached: yes Auto update: enabled Source: Server: https://images.linuxcontainers.org Protocol: simplestreams Alias: 8b0b414d9fc2 Profiles: - default |
|||||||
Так же в этом разделе:
|
|||||||
|
|||||||
|