Dockerfile optimization
Created by: IvanBayan
Dockerfile modifications, allow to reduce build time and size.
➜ Part-DB git:(master) ✗ time docker build -t partdb/original . > /tmp/partdb_original
docker build -t partdb/original . > /tmp/partdb_original 0.47s user 0.29s system 0% cpu 5:20.56 total
➜ Part-DB git:(master) ✗ git checkout docker
M docker-compose.yml
Switched to branch 'docker'
➜ Part-DB git:(docker) ✗ time docker build -t partdb/optimized . > /tmp/partdb_optimized
docker build -t partdb/optimized . > /tmp/partdb_optimized 0.42s user 0.28s system 0% cpu 2:53.87 total
➜ Part-DB git:(docker) ✗ docker image ls|grep partdb/
partdb/optimized latest 90dc38b9ea00 2 minutes ago 733MB
partdb/original latest d5d61bf91a22 32 minutes ago 1.15GB
Files/directories permissions is a topic to discuss.