首页 文章 精选 留言 我的

精选列表

搜索[自动装配],共10000篇文章
优秀的个人博客,低调大师

docker 自动构建,基于Dockerfile文件

原文地址:http://kekefund.com/2017/03/06/docker-dockerfile-generated/ 1,Dockerfile的编写 在centos中创建一个目录:/mydata/data/dockertest/,新建Dockerfile文件 vim Dockerfile # Verison 0.6: # 基础镜像 FROM chenbb/fofeasy:0.6 # 维护者信息 MAINTAINER cbbing@163.com # 镜像操作命令 RUN rm -rf /opt/tomcat/webapps/fofeasy RUN rm -rf /opt/tomcat/webapps/fofeasy.war ADD fofeasy.war /opt/tomcat/webapps/fofeasy.war # 容器启动命令 #CMD ["/opt/tomcat/bin/catalina.sh", "run"] 编写完成后:wq保存。 2,构建 基于Dockerfile构建镜像,在Dockerfile文件所在目录下执行 [root@VM_200_249_centos dockertest]# docker build -t chenbb/fofeasy:0.7 . Sending build context to Docker daemon 65.78 MB Step 1 : FROM chenbb/fofeasy:0.6 ---> c441af7f5405 Step 2 : MAINTAINER cbbing@163.com ---> Running in f7cbd5cd3199 ---> cef4cee90997 Removing intermediate container f7cbd5cd3199 Step 3 : RUN rm -rf /opt/tomcat/webapps/fofeasy ---> Running in 79505ed64d7f ---> 4f85be099a20 Removing intermediate container 79505ed64d7f Step 4 : RUN rm -rf /opt/tomcat/webapps/fofeasy.war ---> Running in be162f93530b ---> c5cc2ba60023 Removing intermediate container be162f93530b Step 5 : ADD fofeasy.war /opt/tomcat/webapps/fofeasy.war ---> 8ede3a4f83e5 Removing intermediate container b9b557e26828 Successfully built 8ede3a4f83e5 [root@VM_200_249_centos dockertest]# 注: chenbb/fofeasy:0.7为新镜像的名字 fofeasy.war文件放到同一目录 [root@VM_200_249_centos dockertest]# ll -lh 总用量 63M -rw-r--r-- 1 root root 322 3月 3 17:00 Dockerfile -rw-r--r-- 1 root root 63M 3月 3 16:46 fofeasy.war 3,启动 docker run -d -p 58080:8080 --name javaweb chenbb/javaweb:0.7 /root/run.sh 3,一些问题 容器启动不起来 考虑是容器里的命令执行报错引起的,重新从镜像创建容器,排除问题,或者通过 "docker logs <容器ID>" 查看错误日志 参考 http://www.jianshu.com/p/690844302df5

优秀的个人博客,低调大师

openstack 镜像自动扩容 resize拉伸

The simplest way to support this in your image is to install the cloud-utils package (contains the growpart tool for extending partitions), the cloud-initramfs-growroot package (which supports resizing root partition on the first boot), and the cloud-init package into your image. With these installed, the image performs the root partition resize on boot. For example, in the /etc/rc.local file. These packages are in the Ubuntu and Debian package repository, as well as the EPEL repository (for Fedora/RHEL/CentOS/Scientific Linux guests). If you cannot install cloud-initramfs-tools, Robert Plestenjak has a github project called linux-rootfs-resize that contains scripts that update a ramdisk by using growpart so that the image resizes properly on boot. If you can install the cloud-utils and cloud-init packages, we recommend that when you create your images, you create a single ext3 or ext4 partition (not managed by LVM).

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册