lxc

LXC容器运行X Server(续1)

跟風遠走 提交于 2019-12-26 14:44:16
容器要运行X桌面环境可通过ssh,xdmcp远程方式,此时容器是X Client,容器是无需安装X Server. 上篇( https://blog.51cto.com/13752418/2440496 )容器中以本地方式运行X是在宿主的虚拟终端(如vt09)上运行容器X. 本文是续篇,同样容器中以本地方式运行X Server,介绍的内容是容器运行X在宿主的桌面窗口之上,容器以本地方式登录桌面环境,即界面上类似VirtualBox的方式. 实验环境 : debian 11 主机名 shell提示符 ----------------------------------------------- 宿主 : debian root@debian:/# 容器 : vm1 root@vm1:/# 一.简单步骤 1.宿主 1)安装Xephyr root@debian:/# apt-get install xserver-xephyr 2)安装容器工具LXC root@debian:/# apt-get install lxc 3)创建容器 root@debian:/# lxc-create -t debian -n vm1 创建了以debian为模版的容器,其根目录是/var/lib/lxc/vm1/rootfs/ 这一制作容器的根的过程耗费较长时间,如果已有了容器,此步骤可省略. 4

PouchContainer 容器技术演进助力阿里云原生升级

試著忘記壹切 提交于 2019-12-26 11:02:09
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 我们从 2016 年开始在集团推广全面的镜像化容器化,今年是集团全面镜像化容器化后的第 4 个 双11,PouchContainer 容器技术已经成为集团所有在线应用运行的运行时底座和运维载体,每年 双11 都有超过百万的 PouchContainer 容器同时在线,提供电商和所有相关的在线应用平稳运行的载体,保障大促购物体验的顺滑。 我们通过 PouchContainer 容器运行时这一层标准构建了应用开发和基础设施团队的标准界面,每年应用都有新的需求、新的变化,同时基础设施也有上云/混部/神龙/存储计算分离/网络变革这些升级,两边平行演进,互不干扰。技术设施和 PouchContainer 自身都做了很大的架构演进,这些很多的架构和技术演进对应用开发者都是无感知的。 在容器技术加持的云原生形成趋势的今天,PouchContainer 容器技术支持的业务方也不再只有集团电商业务和在线业务了,我们通过标准化的演进,把所有定制功能做了插件化,适配了不同场景的需要。除了集团在线应用,还有运行在离线调度器上面的离线 job 类任务、跑在搜索调度器上面的搜索广告应用、跑在 SAE/CSE 上面的 Serverless 应用、专有云产品及公有云(ACK+CDN)等场景,都使用了 PouchContainer 提供的能力。

PouchContainer 容器技术演进助力阿里云原生升级

人走茶凉 提交于 2019-12-25 15:41:38
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 点击下载《不一样的 双11 技术:阿里巴巴经济体云原生实践》 作者 | 杨育兵(沈陵) 阿里巴巴高级技术专家 我们从 2016 年开始在集团推广全面的镜像化容器化,今年是集团全面镜像化容器化后的第 4 个 双11,PouchContainer 容器技术已经成为集团所有在线应用运行的运行时底座和运维载体,每年 双11 都有超过百万的 PouchContainer 容器同时在线,提供电商和所有相关的在线应用平稳运行的载体,保障大促购物体验的顺滑。 我们通过 PouchContainer 容器运行时这一层标准构建了应用开发和基础设施团队的标准界面,每年应用都有新的需求、新的变化,同时基础设施也有上云/混部/神龙/存储计算分离/网络变革这些升级,两边平行演进,互不干扰。技术设施和 PouchContainer 自身都做了很大的架构演进,这些很多的架构和技术演进对应用开发者都是无感知的。 在容器技术加持的云原生形成趋势的今天,PouchContainer 容器技术支持的业务方也不再只有集团电商业务和在线业务了,我们通过标准化的演进,把所有定制功能做了插件化,适配了不同场景的需要。除了集团在线应用,还有运行在离线调度器上面的离线 job 类任务、跑在搜索调度器上面的搜索广告应用、跑在 SAE/CSE 上面的

Building meta-virtualization layer in yocto

自古美人都是妖i 提交于 2019-12-24 11:08:13
问题 I am trying to add the meta-virtualization layer in my yocto project. The layer depends on openembedded-core and multiple layers provided by meta-openembedded. Following is the structure of my bblayers.conf file after adding the meta-virtualization layer and it's dependencies. BBLAYERS ?= " \ /home/mshehery/Downloads/git/Yocto/poky/meta \ /home/mshehery/Downloads/git/Yocto/poky/meta-yocto \ /home/mshehery/Downloads/git/Yocto/poky/meta-yocto-bsp \ /home/mshehery/Downloads/git/Yocto/poky/meta

Resizing Docker containers

为君一笑 提交于 2019-12-23 14:55:13
问题 I am trying to see if size of each docker container can be limited through some configuration. Following this , I am able to increasing the size of a running container from 10G. Can I shrink it? Trying to shrink threw an error saying online shrinking not supported . Ideally, I am looking for options to configure and set default container size which containers will inherit when getting created. Docker doc on devicemapper suggested --storage-opt while starting docker daemon. But it does not

How does Docker share resources

南笙酒味 提交于 2019-12-22 05:06:37
问题 I've been looking into Docker and I understand from this post that running multiple docker containers is meant to be fast because they share kernel level resources through the "LXC Host," however, I haven't found any documentation about how this relationship works that is specific to the docker configuration, and at what level are resources shared. What's the involvement of the Docker image and the Docker container with shared resources and how are resources shared? Edit: When talking about

How to programmatically monitor if a docker container exited?

旧城冷巷雨未停 提交于 2019-12-22 04:17:21
问题 I am running multiple named docker containers (200+) on my VM Host. I have a manager script/code that is supposed to manage the containers from the host. I would like to know if there is any event-based mechanism to get notified when a container stops/fails. So that I can restart the stopped container. One solution I could think of is doing a periodic docker inspect and looking at State.Pid or State.Running to confirm the status. But,instead of periodic polling, it would be better if the

Assigning IP address to docker containers?

夙愿已清 提交于 2019-12-20 13:58:25
问题 I'm new to Docker. Is it possible to assign an IP address (from a DHCP server) to Docker containers running on a host or VM? If yes, can someone point me in the correct direction. If no, is it a fundamental limitation of the container approach or it's just a feature that's not in Docker yet. 回答1: Caveat - Docker is under heavy development so confirming against current docs is advisable. The network element is one of those under current discussion on docker-dev , it looks like longer term

[zz]lxc学习

孤街浪徒 提交于 2019-12-19 07:55:51
lxc能做什么: 可以为容器绑定特定的cpu和memory,分配特定比例的cpu时间、IO时间,限制可以使用的内存大小(包括内存和swap空间),提供device访问控制,提供独立的namespace(网络、pid、ipc、mnt、uts)。 默认的lxc配置是隔离pids(进程) sysv ipc(进程间通信),和挂载点。如果想运行sshd,就必须提供一个新的网络堆栈和hostname,如果想要避免文件冲突,需要重新挂载冲突文件到不同的地方。如果想要避免所有的冲突,你需要重新挂载一个文件系统。 lxc的实现: Sourceforge上有LXC这个开源项目,但是LXC项目本身只是一个为用户提供一个用户空间的工具集,用来使用和管理LXC容器。LXC真正的实现则是靠Linux内核的相关特性,LXC项目只是对此做了整合。基于容器的虚拟化技术起源于所谓的资源容器和安全容器。 LXC在 资源管理方面 依赖与Linux内核的 cgroups子系统 ,cgroups子系统是Linux内核提供的一个基于进程组的资源管理的框架,可以为特定的进程组限定可以使用的资源。LXC在 隔离控制方面 依赖于Linux内核的 namespace特性 ,具体而言就是在clone时加入相应的flag(NEWNS NEWPID等等)。 lxc常见命令使用: lxc-version 用于显示系统LXC的版本号