uber-archive / makisu

Fast and flexible Docker image building tool, works in unprivileged containerized environments like Mesos and Kubernetes.
Apache License 2.0
2.41k stars 154 forks source link

Fixed COPY oom errors #214

Closed apourchet closed 5 years ago

apourchet commented 5 years ago

We used to read the files into memory to update a checksum, we are now just using a checksum stream.

apourchet commented 5 years ago

For reference, this is the setup i used to repro the issue:

$ dd if=/dev/urandom bs=16384 count=65536 > testfile
$ ls -l
total 2097288
-rw-r--r--  1 pourchet  wheel          27 Apr 25 12:58 Dockerfile
-rw-r--r--  1 pourchet  wheel  1073741824 Apr 25 13:01 testfile
$ cat Dockerfile
FROM debian:9
ADD testfile /testfile

I ran this build inside a docker container with 500m memory limit. It failed with v0.1.10 and succeeded with this new build.