Closed frezbo closed 5 years ago
More data: Non- Multistage build
img (aws:rean-gov-sd)(kc)$ for i in {1..10}; do time buildah build-using-dockerfile --layers -f Dockerfile.new .; done
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.869s
user 0m0.124s
sys 0m0.126s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.659s
user 0m0.152s
sys 0m0.100s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.724s
user 0m0.139s
sys 0m0.098s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.883s
user 0m0.146s
sys 0m0.102s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.705s
user 0m0.149s
sys 0m0.107s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.771s
user 0m0.137s
sys 0m0.110s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.714s
user 0m0.146s
sys 0m0.111s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.824s
user 0m0.141s
sys 0m0.093s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.706s
user 0m0.141s
sys 0m0.102s
STEP 1: FROM docker.io/library/alpine
STEP 2: RUN echo hi
--> Using cache f252e091be7c0e2c3a03345e3113216822a2b586cfab42036f61b47d1849d7c7
STEP 3: COMMIT
real 0m0.747s
user 0m0.145s
sys 0m0.104s
img (aws:rean-gov-sd)(kc)$
Dockerfile
img (aws:rean-gov-sd)(kc)$ cat Dockerfile.new
FROM docker.io/library/alpine
RUN echo hi
img (aws:rean-gov-sd)(kc)$
I'm currently evaluating tools that builds Dockerfiles rootless and creting benchmark data, so that one coule be finalized in CI. As of now buildkit wins.
@mtrmac @nalind @baude @umohnani8 PTAL
It would be useful to collect data with more detailed timing information; at least buildah --debug
.
(The difference between ~16 and ~2 seconds is way too much to be a completely random fluctuation; just a wild guess, could there be an adaptive caching proxy in the way, which eventually learns that some files are frequently requested?)
@frezbo Any more info on this?
No response from reporter, Closing reopen if this is still an issue.
Dockerfile