hgarrereyn / GraphFuzz

GraphFuzz is an experimental framework for building structure-aware, library API fuzzers.
https://hgarrereyn.github.io/GraphFuzz
MIT License
254 stars 25 forks source link

Docker build issues #14

Closed thuanpv closed 1 year ago

thuanpv commented 1 year ago

Hi. Thanks for making this great work open source!

I just tried to play with the tool a bit by reproducing your experiments with Skia using the given docker files.

However, I got this error while building graphfuzz_base image

Collecting msgpack>=0.5.2 (from cachecontrol[filecache]<0.13.0,>=0.12.9; python_version >= "3.6" and python_version < "4.0"->poetry)
  Downloading https://files.pythonhosted.org/packages/22/44/0829b19ac243211d1d2bd759999aa92196c546518b0be91de9cacc98122a/msgpack-1.0.4.tar.gz (128kB)
Collecting filelock>=3.8.0; extra == "filecache" (from cachecontrol[filecache]<0.13.0,>=0.12.9; python_version >= "3.6" and python_version < "4.0"->poetry)
  Could not find a version that satisfies the requirement filelock>=3.8.0; extra == "filecache" (from cachecontrol[filecache]<0.13.0,>=0.12.9; python_version >= "3.6" and python_version < "4.0"->poetry) (from versions: 0.2.0, 0.2.1, 0.2.2, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 2.0.0, 2.0.1, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 3.0.0, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.0.8, 3.0.9, 3.0.10, 3.0.12, 3.1.0, 3.2.0, 3.2.1, 3.3.0, 3.3.1, 3.3.2, 3.4.0, 3.4.1)
No matching distribution found for filelock>=3.8.0; extra == "filecache" (from cachecontrol[filecache]<0.13.0,>=0.12.9; python_version >= "3.6" and python_version < "4.0"->poetry)
The command '/bin/sh -c python3 -m pip install poetry' returned a non-zero code: 1

Have you face the (similar) issue? I am using Ubuntu 20.04 64-bit.

Best regards,

Thuan

NikLeberg commented 1 year ago

Hi Thuan, not the creator here, but in one of my projects I build my own container and run these commands successfully. Its based on Ubuntu 22.04 aka Jammy though. Maybe it helps.

hgarrereyn commented 1 year ago

I think the poetry installation issue was caused by python3.6 being deprecated (and the default in ubuntu 18.04). I just pushed a change to switch the base image to python3.8 instead as I fear switching from ubuntu 18.04 in all those images might break other things...

I was able to build the base images with this change, could you let me know if this fixes your issue?

Happy to help debug if there are other issues!

thuanpv commented 1 year ago

Thanks both. @hgarrereyn, I get this error with your newest code

Step 5/10 : WORKDIR /graphfuzz
 ---> Running in 4762fe818a26
Removing intermediate container 4762fe818a26
 ---> cb09ae8a8311
Step 6/10 : COPY cli /graphfuzz/cli
COPY failed: file not found in build context or excluded by .dockerignore: stat cli: file does not exist

I tried to run docker build from both the graphfuzz root folder (docker build experiments/base) and the experiments/base folder (docker build .) but I got the same error. I don't think this is related to Ubuntu version but I can try to follow Nik's suggestion and build the images on Ubuntu 22.04.

hgarrereyn commented 1 year ago

There is a build and run script in the /experiments folder that will set up the proper context when building. E.g. inside the /experiments folder, run./build base to build the graphfuzz_base image then ./build skia to build the skia image, then ./run skia to launch the skia image.

If you want to run the commands outside of that wrapper, you can use this command for the base image:

cd experiments
docker build .. -f base/Dockerfile -t graphfuzz_base

For other images (e.g. skia), use this command:

cd experiments
docker build ./skia -f ./skia/Dockerfile -t graphfuzz_skia