
- 外文名
- Container
- 分 类
- 结构分类,所装货物分类,重量分类
- 用 处
- 保留和装存物品
- 中文名
- 箱子[集装箱]
-
Container
2005-07-23 12:34:00A Container is an object that can execute requests received from a client, and return responses based on those requests. A Container may optionally support a pipeline of Valves that process the requesA Container is an object that can execute requests received from a client, and return responses based on those requests. A Container may optionally support a pipeline of Valves that process the request in an order configured at runtime, by implementing the Pipeline interface as well.
Containers will exist at several conceptual levels within Catalina. The following examples represent common cases:
- Engine - Representation of the entire Catalina servlet engine, most likely containing one or more subcontainers that are either Host or Context implementations, or other custom groups.
- Host - Representation of a virtual host containing a number of Contexts.
- Context - Representation of a single ServletContext, which will typically contain one or more Wrappers for the supported servlets.
- Wrapper - Representation of an individual servlet definition (which may support multiple servlet instances if the servlet itself implements SingleThreadModel).
A Container may also be associated with a number of support components that provide functionality which might be shared (by attaching it to a parent Container) or individually customized. The following support components are currently recognized:
- Loader - Class loader to use for integrating new Java classes for this Container into the JVM in which Catalina is running.
- Logger - Implementation of the
log()
method signatures of theServletContext
interface. - Manager - Manager for the pool of Sessions associated with this Container.
- Realm - Read-only interface to a security domain, for authenticating user identities and their corresponding roles.
- Resources - JNDI directory context enabling access to static resources, enabling custom linkages to existing server components when Catalina is embedded in a larger server.
-
Flutter 常用布局之Container
2020-09-23 18:36:54在Flutter开发中接触到的Container(容器),它也有相关的属性供我们使用. Container可以根据属性的设置来展现不同的布局大小和样式,还可以容纳其他Widget. Container只所以可以是容器,因为它可以容纳其它的widget. ...生活中离不开杯子、碗、盆等容器
喝水需要杯子,装饭装肉用的碗,洗脸洗脚用的盆.
杯子、碗、洗脸盆都有自己的颜色、宽度、高度;这一切属性根据我们的需求到商店进行了购买.
在Flutter开发中接触到的Container(容器),它也有相关的属性供我们使用.
Container可以根据属性的设置来展现不同的布局大小和样式,还可以容纳其他Widget.
Container只所以可以是容器,因为它可以容纳其它的widget.
常用属性 width、height、color、alignment、padding
........
固定宽高
Center( child: Container(width: 100.0,height: 100.0,color: Colors.blue,), ),
Center( child: Container(width: 200.0,height: 100.0,color: Colors.red,), )
宽度和高度无穷大
Center( child: Container( width: double.infinity, height: double.infinity, //color: Colors.red, decoration: BoxDecoration(color: Colors.blue,), ), )
宽高>=-0.0 (宽高为正数和-0.0)
Center( child: Container( width: -100.0, height: -100.0, //color: Colors.red, decoration: BoxDecoration(color: Colors.blue,), ), ),
运行异常
Container宽高约束条件
子widget对其方式
常见的对齐方式
topLeft、topCenter、topRight、centerLeft、center、centerRight、bottomLeft、bottomCenter、bottomRight.
对齐方式是以容器的中心点为基准
Alignment center = Alignment(0.0, 0.0)
Container( width: 200.0, height: 200.0, color: Colors.red, alignment: Alignment.center, child: Text("xmiaoshen"), ), )
对齐方式以容器的最左边顶部为基准
Alignment topLeft = Alignment(-1.0, -1.0)
Container( width: 200.0, height: 200.0, color: Colors.blue, alignment: Alignment.topLeft, child: Text("xmiaoshen",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18.0),), )
自定义对齐方式
Container( width: 200.0, height: 200.0, color: Colors.blue, alignment: Alignment(0.5,0.5), child: Text("xmiaoshen",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18.0),), ),
内边距
内边距 (padding): Container 内部widget分别到四边距离.
Container( width: 200.0, height: 200.0, color: Colors.blue, padding: EdgeInsets.only(top: 10.0,left: 10.0), alignment: Alignment.topLeft, child: Text("xmiaoshen",style: TextStyle(fontWeight: FontWeight.bold,fontSize: 18.0),), )
子widget宽高超过或者等于父容器时,内边距属性padding依然有效
Container( width: 200.0, height: 200.0, color: Colors.blue, padding: EdgeInsets.all(18.0), alignment: Alignment.topLeft, child: Container(width: 200.0,height: 200.0,color: Colors.black45,), )
Container( width: 200.0, height: 200.0, color: Colors.blue, padding: EdgeInsets.all(18.0), alignment: Alignment.topLeft, child: Container(width: 300.0,height: 300.0,color: Colors.black45,), )
外边距
外边距 (margin): Container 分别到父容器Container四边距离.
Container( width: 200.0, height: 200.0, color: Colors.blue, alignment: Alignment.topLeft, child: Container( width: 200.0, height: 200.0, color: Colors.black45, margin: EdgeInsets.all(20.0), ), )
container宽高超过或者等于父容器时,外边距属性margin依然有效
Container( width: 200.0, height: 200.0, color: Colors.blue, alignment: Alignment.topLeft, child: Container( width: 300.0, height: 300.0, color: Colors.black45, margin: EdgeInsets.all(20.0), ), )
添加约束
容器约束
当我们设置容器的 width 必须在 minWith 和 maxWith 之间.
当我们设置容器的 height 必须在 minHeight 和 maxHeight 之间.
美化Container
通过设置 Container 的属性
decoration (装饰、装饰品)
Box (盒子)
设置边框
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, border: Border.all(color: Colors.purple,width: 6.0), ), )
边框变圆角
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, border: Border.all(color: Colors.purple,width: 6.0), borderRadius: BorderRadius.all(Radius.circular(20.0)) ), )
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, border: Border.all(color: Colors.purple,width: 6.0), borderRadius: BorderRadius.only( topLeft: Radius.circular(20.0), bottomRight: Radius.circular(20.0)) ), )
矩形变圆形
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, border: Border.all(color: Colors.purple,width: 6.0), shape: BoxShape.circle ), )
设置阴影
offset 阴影开始坐标(相对于手机屏幕原点偏移量) ,blurRadius 阴影模糊半径 ,spreadRadius 阴影扩散半径.
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, boxShadow: [ BoxShadow( color: Colors.purple, offset: Offset(-6.0, 6.0), blurRadius: 6.0,spreadRadius: 3.0) ], shape: BoxShape.rectangle), )
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, boxShadow: [ BoxShadow( color: Colors.purple, offset: Offset(-6.0, 6.0), blurRadius: 6.0,spreadRadius: 3.0) ], shape: BoxShape.circle), )
渐变背景
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, gradient: LinearGradient(colors: [ Colors.blue.withOpacity(1.0), Colors.blue.withOpacity(0.9), Colors.blue.withOpacity(0.8), Colors.blue.withOpacity(0.7), Colors.blue.withOpacity(0.6), Colors.blue.withOpacity(0.5), Colors.blue.withOpacity(0.4), Colors.blue.withOpacity(0.3), Colors.blue.withOpacity(0.2), Colors.blue.withOpacity(0.1), ], begin: Alignment.topCenter, end: Alignment.bottomCenter)), )
小太阳
Container( width: 200.0, height: 200.0, //color: Colors.black45, decoration: BoxDecoration( color: Colors.blue, gradient: RadialGradient( center: const Alignment(0.0, 0.0), // near the top right radius: 0.2, colors: [ const Color(0xFFFFFF00), // yellow sun const Color(0xFF0099FF), // blue sky ], stops: [0.3, 1.0], )), )
参考
-
解决Error response from daemon: oci runtime error: container_linux.go:247: starting container ...
2019-03-07 14:27:43我是在guigu上学习的springboot的视频,有一些很难受的问题,这个问题...docker 启动容器报错:Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "write...我是在guigu上学习的springboot的视频,有一些很难受的问题,这个问题已经让我难受一天多了,后来终于在一片文章中解决了,给大家分享一下:
docker 启动容器报错:Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "write parent: broken pipe"
其实原因还是,linux与docker版本的兼容性问题
第一步:通过uname -r命令查看你当前的内核版本
uname -r
第二步:使用
root
权限登录 Centos。确保 yum 包更新到最新。sudo yum update
第三步:卸载旧版本(如果安装过旧版本的话)
sudo yum remove docker docker-common docker-selinux dockesr-engine
第四步:安装需要的软件包, yum-util 提供yum-config-manager功能,另外两个是devicemapper驱动依赖的
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
第五步:设置yum源
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
第六步:可以查看所有仓库中所有docker版本,并选择特定版本安装
yum list docker-ce --showduplicates | sort -r
第七步:安装docker
sudo yum install docker-ce
第八步:启动并加入开机启动
sudo systemctl start docker sudo systemctl enable docker
第九步:验证安装是否成功(有client和service两部分表示docker安装启动都成功了)
docker version
完美解决,如果还没有解决请联系做作者下方评论!
-
如何进入、退出docker的container
2016-11-01 18:32:13Docker的镜像称为image,容器称为container。 对于Docker来说,image是静态的,类似于操作系统快照,而container则是动态的,是image的运行实例。 比如,有一个image名称为ubuntu,那么比如现在我们启动这个image...转载请注明出处:http://blog.csdn.net/dongdong9223/article/details/52998375
本文出自【我是干勾鱼的博客】1 启动docker服务
首先需要知道启动docker服务是:
service docker start
或者:
systemctl start docker
2 关闭docker服务
关闭docker服务是:
service docker stop
或者:
systemctl stop docker
3 启动docker某个image(镜像)的container(容器)
Docker的镜像称为image,容器称为container。
对于Docker来说,image是静态的,类似于操作系统快照,而container则是动态的,是image的运行实例。
比如,有一个image名称为ubuntu,那么比如现在我们启动这个image的container并且进入到这个container的bash命令行中:
docker run -t -i ubuntu /bin/bash
官网是这么说的:
- docker run: runs a container.
- ubuntu: is the image you would like to run.
- -t: flag assigns a pseudo-tty or terminal inside the new container.
- -i: flag allows you to make an interactive connection by grabbing the standard in (STDIN) of the container.
- /bin/bash: launches a Bash shell inside our container.
理解很简单:
-
docker run:启动container
-
ubuntu:你想要启动的image
-
-t:进入终端
-
-i:获得一个交互式的连接,通过获取container的输入
-
/bin/bash:在container中启动一个bash shell
这样就进入container的内部了:
root@af8bae53bdd3:/#
如果有运行中的container,可以在container所在的外部操作系统中运行:
docker ps
查看到这个container。
如果想看到所有的container,包括运行中的,以及未运行的或者说是沉睡镜像,则运行:
docker ps -a
如果要退出就:
Ctrl-D
或:
root@af8bae53bdd3:/# exit
如果想再次打开这个container,运行:
docker start goofy_almeida
其中“goofy_almeida”是容器的名称。
4 进入container(容器)
4.1 使用“docker attach”命令进入
这个时候container运行在后台,如果想进入它的终端,则:
docker attach goofy_almeida
就可以了。
4.2 使用“docker exec -it”命令进入
使用“docker attach”命令进入container(容器)有一个缺点,那就是每次从container中退出到前台时,container也跟着退出了。
要想退出container时,让container仍然在后台运行着,可以使用“docker exec -it”命令。每次使用这个命令进入container,当退出container后,container仍然在后台运行,命令使用方法如下:
docker exec -it goofy_almeida /bin/bash
-
goofy_almeida:要启动的container的名称
-
/bin/bash:在container中启动一个bash shell
这样输入“exit”或者按键“Ctrl + C”退出container时,这个container仍然在后台运行,通过:
docker ps
就可以查找到。
5 退出container
输入:
exit
或者按键:
Ctrl + D
-
docker中宿主机与容器(container)互相拷贝传递文件的方法
2017-05-08 17:38:10前面讲解过如何进入、退出docker的container。今天来讲一下在docker中宿主机与容器(container)互相拷贝传递文件的方法。1 从宿主机拷贝文件到容器拷贝方式为:docker cp 容器名:要拷贝的宿主机的文件名 -
docker container
2018-12-04 09:46:04docker container COMMAND 命令 描述 docker container attach 进入正在运行的容器 docker container commit 保存现在的容器为镜像 docker container cp 拷贝镜像中的稳健 docker container create ... -
docker查看完整containerId
2020-11-09 14:51:371、docker查看完整containerId docker ps --no-trunc -
container 和container-fluid区别
2018-08-03 11:29:47(1)container-fluid的width是100%,而container的width是用媒体查询获得的动态尺寸。两者样式肯定是不一样的。并且由于 padding的原因两者不可用嵌套,他们就是提供两种视觉风格。 (2)container-fluid和... -
Flutter 容器Container嵌套Container出现内部Container设置宽高属性不生效问题分析
2020-12-08 17:59:32Container嵌套Container,内部Container设置宽高属性不生效,即使设置constraints约束也不生效 2、解决方案: 取消两个Container的宽高设置,使用constraints去约束宽高即可限制内部的Container的宽高(注意不要设置宽高,... -
bootstrap框架的.container 和container-fluid 类的区别
2018-06-02 17:41:39.container 类用于固定宽度并支持响应式布局的容器。.container-fluid 类用于 100% 宽度,占据全部视口(viewport)的容器。通过使用chrome浏览器实验html代码:得出以下结论:1、.container类的div左右两边有一个15... -
分布式进阶(十二)Docker固定Container IP
2015-05-30 20:27:45前提:每个Container所做的工作现在还很少,可以不用save、commit。 为了便于通信,自定义一个网桥(192.168.1.180/24),使之IP与宿主主机IP在同一网段内。 bridge模式 bridge模式是Docker默认的网络设置,此模式会... -
container与container-flude区别
2019-04-07 15:05:17测试页面 <div class="container"> <p>这是container效果</p><h3>hello world</h3> </div> <div class="container-fluid"> ... -
container-fluid container的区别
2016-12-05 09:50:35container-fluid container的区别*container-fluid的width是100%,而container的width是用媒体查询获得的动态尺寸。 container 类和container-fluid类的区别体现在是否有随视口宽度改变的margin存在。 container... -
docker for windows的windows container下部署mysql
2019-12-30 10:30:39本次是在win10环境下的windows container模式中部署mysql镜像 部署步骤如下: 1、在dockerhub上拉取winamd64版本的mysql镜像。 2、启动命令 docker run -p 3307:80 -it --name mysqlContainer -d nanoserver/... -
c++ container
2016-04-19 10:31:27容器:特定对象的集合 顺序容器:单一元素的集合,根据位置存储和访问对象 三种顺序容器: vector deque ...Container c ...Container c(n) ...Container c(ita, itb) ...Container c(n, x) 要求顺序...Container c(anoc) -
YARN之Container-什么是Container?
2019-01-30 14:05:05在最基本的层面上,Container是单个节点上如RAM、CPU核核磁盘等物理资源的集合。单个节点上(或者单个大节点)可以有多个Container。系统中的每个节点可以认为是由内存(如512MB或者1GB)和CPU的最小容量的多个... -
Docker新手教程(04)docker container run与docker container start的区别
2019-04-15 22:05:0804、docker container run与docker container start的区别 两个命令的区别: docker container run docker container start [containerID] 1、run 命令 命令: docker container run 说明: 创建好image后,新建... -
Init Container
2018-06-20 16:30:05Init Container的应用场景 当我们在运用一个服务之前,通常会做一些初始化的工作,而这些工作一般只需要运行一次,成功后就不再运行。为此kubernetes 引入了Init Container,用于在启动应用容器之前启动一个或多个... -
Docker问题:container_linux.go:345: starting container process caused “process_linux.go:430
2019-08-20 18:47:57docker问题:container_linux.go:345: starting container process caused "process_linux.go:430 上一篇:离线安装docker服务. 由于前面是离线安装的docker服务,所以我所有的服务镜像都是打成tar包进来的。在... -
Docker Failed to start Docker Application Container Engine.
2020-03-23 17:50:41docker重启后遇到这个问题,记录一下解决办法 ...● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: di... -
Docker Container介绍
2019-05-20 23:05:321.什么是Container 通过Image创建(copy) 在Image layer之上建立一个container layer(可读写) 类比面向对象: 类和实例 Image负责app的储存和发行,Container负责运行app 2. 常用指令介绍 docker container ls //... -
bootstrap中container类和container-fluid类的区别
2018-02-08 11:44:50近几天才开始系统的学习bootstrap,但马上就遇到了一个‘拦路虎’:container和container-fluid到底什么区别。 查了很多资料,看到很多人和我有同样的疑问,但是下面的回答一般都是一个是响应式一个宽度是百分百,说... -
container和container-fluid之间的区别
2017-08-11 15:16:51.container 类用于固定宽度并支持响应式布局的容器。 .container-fluid 类用于 100% 宽度,占据全部视口(viewport)的容器。 个人理解: container类根据不同屏幕宽度,通过媒体查询,阶段性的赋值一个固定宽度... -
Flutter Container属性
2018-11-28 21:49:12FLUTTER 开发初识Flutter 布局之ContainerContainer简介Container 组成Container的构造 Flutter 布局之Container 最近新接触一个开发平台Flutter,它是谷歌在2018开发者大会上正式发布的一个全新开发工具,它最显著... -
Bootstrap : container 和container-fluid区别
2017-08-17 16:45:47Bootstrap responsive:.container-fluid{ margin:0; }.container{ margin:0 15px 0 15px; } -
container与container-fluid的区别
2018-09-13 16:28:38container使用的是媒体查询获知用户访问页面的设备,当设备不同,屏幕的体现效果也不同,在CSS文档中它的固定宽度为960px,引入了响应式则会自我调整。 /* 大屏幕 */ @media (min-width: 1200px) { ... } /* 平板... -
Bootstrap框架中container和container-fluid的区别
2019-03-24 15:05:50对bootstrap框架有一定了解的朋友都知道,一般页面布局中的开头会使用到container或container-fluid类,那么它们有什么区别呢?不急!下面为您讲解。 我们先来看看官方对这两个类是怎么说的: .container 类用于... -
docker之container
2018-05-09 09:15:25运行一个container的本身就是开启一个具有独立namespace的进程 进程有自己的网络,文件系统等docker通过run命令来启动一个container运行一个container必须要指定一个image作为初始化的文件系统 对于不存在的image... -
布局容器container 和流式布局容器container-fluid
2017-10-12 17:00:47布局容器 container container是用于布局页面的容器类.作用和网页的版心类似.container有固定的宽度和页面居中的效果. container的固定宽度是根据屏幕的大小来变化的 屏幕类型 页面宽度 container宽度 ...
-
面向服务中心的地理信息系统总体架构
-
企业站推广:100种实用的推广方法(二)
-
Linux与数据库基础
-
一种通用机载总线接口控制文档设计方法
-
自适应权值的跨尺度立体匹配算法
-
原子光刻中原子通量的优化研究
-
基于时间序列的电力信息系统资源调配研究
-
Design and experimental demonstration of a high conversion efficiency OPCPA pre-amplifier for petawatt laser facility
-
亿度云盘~Java小白入门实战
-
力扣 leetcode 1579. 保证图可完全遍历 (python)并查集模板思路简单易懂
-
Java Web开发之Java语言基础
-
Database Management Systems(数据库系统原理总结)- 第二章
-
【部署】gunicorn使用
-
CASIO DT900 DT930 DT940 驱动及软件
-
Bus_SignalCreator.slx
-
pdfbox-debugger-2.0.13.jar
-
第十二届蓝桥杯软件类模拟赛python程序设计 第二期(4)满足条件的序列
-
算法导论(基础知识)——编程大牛的必经之路
-
Leetcode 71. Simplify Path
-
高光谱遥感影像分类数据集.rar