firmadyne / extractor

Kernel and filesystem extractor
MIT License
55 stars 41 forks source link

Update dockerfile #5

Closed AndrewFasano closed 2 years ago

AndrewFasano commented 2 years ago

Prior to this PR, the docker container would fail to build because the sources were outdated (error below). This switches the container to be FROM ubuntu:20.04 and makes a few other changes to get it working.

Note that setting python to mean python3 in the container was necessary to get binwalk's deps.sh to work correctly.

It also changes the container to just use the root user as extraction will be more accurate (i.e., permissions will be maintained) when run as root.

Here's the error message that you'd get from trying to build the container before this PR:

Step 3/9 : RUN apt-get update &&     apt-get upgrade -y &&     apt-get install -y git-core wget build-essential liblzma-dev liblzo2-dev zlib1g-dev unrar-free &&     pip install -U pip
 ---> Running in d259e3fc8d91
Ign http://security.debian.org wheezy/updates Release.gpg
Ign http://security.debian.org wheezy/updates Release
Ign http://deb.debian.org wheezy Release.gpg
Err http://security.debian.org wheezy/updates/main amd64 Packages

Err http://security.debian.org wheezy/updates/main amd64 Packages

Ign http://deb.debian.org wheezy-updates Release.gpg
Err http://security.debian.org wheezy/updates/main amd64 Packages

Err http://security.debian.org wheezy/updates/main amd64 Packages

Ign http://deb.debian.org wheezy Release
Err http://security.debian.org wheezy/updates/main amd64 Packages
  404  Not Found [IP: 151.101.194.132 80]
Ign http://deb.debian.org wheezy-updates Release
Err http://deb.debian.org wheezy/main amd64 Packages
  404  Not Found
Err http://deb.debian.org wheezy-updates/main amd64 Packages
  404  Not Found
W: Failed to fetch http://security.debian.org/debian-security/dists/wheezy/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.194.132 80]

W: Failed to fetch http://deb.debian.org/debian/dists/wheezy/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://deb.debian.org/debian/dists/wheezy-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update &&     apt-get upgrade -y &&     apt-get install -y git-core wget build-essential liblzma-dev liblzo2-dev zlib1g-dev unrar-free &&     pip install -U pip' returned a non-zero code: 100
ddcc commented 2 years ago

Thanks!