container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

permission denied and out of memory error for type file

Open manas86 opened this issue 5 years ago • 0 comments

when trying to run the diff based on file. I'm getting permission error and out of memory error. My code:

from subprocess import check_output, CalledProcessError, STDOUT
    command = ["/usr/local/bin/container-diff", "diff", "daemon://local-image-1:latest", "daemon://local-image-2:latest", "--type=file", "--filename=path-inside-docker-image/config.properties"]
            try:
                s_run = check_output(command, stderr=STDOUT)
                print(s_run.decode("utf-8"))
            except CalledProcessError as e:
                output = e.output.decode()
                success = False
                print(output)

Expected behavior

as per readme.md it should display the difference between the two images for the file mentioned as filename paramter.

Actual behavior

Instead it throws below error: time="2020-06-07T01:11:26Z" level=error msg="Error diffing contents of /home/ec2-user/.container-diff/cache/daemon_local-image-1_latest/bin/bbsuid and /home/ec2-user/.container-diff/cache/daemon_local-image-2_latest/bin/bbsuid: open /home/ec2-user/.container-diff/cache/daemon_local-image-1_latest/bin/bbsuid: permission denied\n" fatal error: runtime: out of memory

Information

It's python 2.7 Image size 1GB+ Base image Alpine

manas86 avatar Jun 07 '20 01:06 manas86