Symptoms:
When pushing a Docker app with default 1GB disk quota, it could fail with error "disk limit is smaller than volume size" as shown below.
[root@mdw ~]# CF_DOCKER_PASSWORD=xxxx cf push img1 --docker-username tom --docker-image tom/tom-repo:img1 tom -t 600
2018-06-25T23:29:06.20-0400 [CELL/0] OUT Cell 21c1ae94-0f86-4dc5-83ec-7b76dd2dba58 creating container for instance da9af175-a04a-4079-49f7-89d5
2018-06-25T23:29:07.88-0400 [CELL/0] ERR Cell 21c1ae94-0f86-4dc5-83ec-7b76dd2dba58 failed to create container for instance da9af175-a04a-4079-49f7-89d5: running image plugin create: making image: creating image: applying disk limits: disk limit is smaller than volume size
2018-06-25T23:29:07.88-0400 [CELL/0] ERR : exit status 1
2018-06-25T23:29:07.88-0400 [CELL/0] OUT Cell 21c1ae94-0f86-4dc5-83ec-7b76dd2dba58 destroying container for instance da9af175-a04a-4079-49f7-89d5
2018-06-25T23:29:07.88-0400 [CELL/0] OUT Cell 21c1ae94-0f86-4dc5-83ec-7b76dd2dba58 successfully destroyed container for instance da9af175-a04a-4079-49f7-89d5
2018-06-25T23:29:07.90-0400 [API/0] OUT Process has crashed with type: "web"
2018-06-25T23:29:07.90-0400 [API/0] OUT App instance exited with guid 6b783e7e-4a21-4d52-8a6b-a99b7147ed22 payload: {"instance"=>"da9af175-a04a-4079-49f7-89d5", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"failed to initialize container: running image plugin create: making image: creating image: applying disk limits: disk limit is smaller than volume size\n: exit status 1", "crash_count"=>3, "crash_timestamp"=>1529983747883330324, "version"=>"a6bc244b-30cb-49f5-8f22-0778392d1b73"}
It seems the application requires more than 1GB disk space. After pushing same application with 2G disk quota it can complete with no problem. However it only shows a small disk usage. It only shows 52K in this example and is less than 1G where "cf push" fails for the application.
[root@mdw ~]# CF_DOCKER_PASSWORD=xxxx cf push img1 --docker-username tom --docker-image tom/tom-repo:img1 tom -t 600 -k 2G
Using docker repository password from environment variable CF_DOCKER_PASSWORD.
Pushing app img1 to org org1 / space dev as admin...
Getting app info...
Updating app with these attributes...
name: img1
docker image: tom/tom-repo:img1
docker username: tom
command: /docker-entrypoint.sh httpd -k start -D FOREGROUND
- disk quota: 1G
+ disk quota: 2G
......
docker image: tom/tom-repo:img1
start command: /docker-entrypoint.sh httpd -k start -D FOREGROUND
state since cpu memory disk details
#0 running 2018-06-26T03:48:35Z 0.0% 25M of 1G 52K of 2G