Docker and ECS Base Disk Size
Recently, we came across an issue about docker container disk space. We temporally saved files in our docker container. The default size is 10G for all the containers. Our largest file is close to 7G, so the solution is to change the size to 20G.
Check the docker version
> docker --version
Docker version 1.12.6, build 7392c3b/1.12.6
Switch to root on these ec2 instances
> sudo -i
Modify the docker configuration to append the base size configuration to 20G
> vi /etc/sysconfig/docker
OPTIONS="--default-ulimit nofile=1024:4096 --storage-opt dm.basesize=20G"
Restart the Service
> sudo service docker restart
Start the ECS agent
> sudo start ecs
Check the docker status and info
> docker info
Containers: 36
Running: 8
Paused: 0
Stopped: 28
Images: 8
Server Version: 1.12.6
Storage Driver: devicemapper
Pool Name: docker-docker--pool
Pool Blocksize: 524.3 kB
Base Device Size: 21.47 GB
Backing Filesystem: ext4
We can see the Base Device Size is 21.47GB now, our changes work.
Get onto the Container
> docker exec -t -i c740f62443ff /bin/bash
Check the size
> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/docker-202:1-263177-1e8be92d66f9b4cbc33186a93859a385c6aba832a21c29ba49271364d632b988 9.8G 664M 8.6G 8% /
tmpfs 15G 0 15G 0% /dev
tmpfs 15G 0 15G 0% /sys/fs/cgroup
/dev/xvda1 40G 9.2G 31G 24% /etc/hosts
shm 64M 0 64M 0% /dev/shm
Upgrade the docker version on the build server
> sudo yum install docker
How to update the AWS cli tool
> pip install --upgrade --user awscli
Add this to the composer.phar install or update if we met some httpunit issue
> php composer.phar install --ignore-platform-reqs
Once thing we need to pay attention to is the build server. My understanding is this, if we only change the config on the docker running server, it does not work. We need to change the configuration on build server which we build our docker images.
Reference:
http://www.projectatomic.io/blog/2016/03/daemon_option_basedevicesize/
http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html
https://github.com/aws/amazon-ecs-agent/issues/549
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
https://hannesvdvreken.com/2015/01/18/composer-ignore-platform-reqs-flag/
分享到:
相关推荐
Continuous Delivery with Docker and Jenkins Delivering software at scale 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有...
Continuous Delivery with Docker and Jenkins 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Docker and Kubernetes for Java Developers 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Continuous Delivery with Docker and Jenkins 英文无水印pdf pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有...
[eBook] Continuous Delivery with Docker and Jenkins Delivering software at scale. ISBN: 1787125238, 9781787125230 (2017)
Continuous Delivery with Docker and Jenkins 英文azw3 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Deploying an application using Docker and Kubernetes
Jenkins Docker and DevOps The Innovation Catalysts,Jenkins Docker and DevOps The Innovation Catalysts
Continuous Delivery with Docker and Jenkins Delivering software at scale 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Docker中文社区马全一的演讲,Docker and Docker Hub
Continuous Delivery with Docker and Jenkins mobi版本,欢迎大家下载指正! 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有...
microservices and learn how to deploy and run Java microservices as Docker containers. Moving on, the book will focus on Kubernetes and its features. You will start by running the local cluster using ...
You'll explore alternative strategies for deploying and running your Docker applications on AWS, including Fargate and ECS Service Discovery, Elastic Beanstalk, Docker Swarm and Elastic Kubernetes ...
为Docker和Amazon ECS代理启用调试模式(仅适用于Systemd初始化系统和Amazon Linux) 在与脚本相同的文件夹中创建tar zip文件 用法 以root用户身份运行此项目: # curl -O ...
1.Overview of Docker the company and growth 2.Overview of Docker the latest stuff (DCUS announcements) & CaaS; 3.Overview of Immutable infrastructure and Microservices; 4.Docker and Immutable ...
在使用Docker的过程中,有时会遇到“systemctl status docker.service and journalctl -xe”这样的报错,这通常意味着Docker服务无法正常启动。在这种情况下,我们需要深入分析问题,找到原因并进行解决。以下是对这...
docker-ecs-service-discovery 用于Prometheus的Docker ECS服务发现服务的仓库 此存储库包含Makefile和Dockerfile以适合标准模式。 此存储库是创建新Docker映像存储库的基础,并添加了githooks子模块,使该存储库可...