cmu-sei / redemption

Redemption is a tool that automatically repairs C/C++ code given a set of static-analysis alerts
Other
4 stars 1 forks source link

Volume-sharing docker command updated and end_to_end_acr --alerts syntax error documented #2

Closed donaldmurf closed 2 months ago

donaldmurf commented 3 months ago

Screenshot from 2024-06-12 11-11-24 The current docker command is: docker run -it --rm -v /code:/myCode docker.cc.cert.org/redemption/distrib bash

lets say I have code I want to repair in /opt/myCode/ Screenshot from 2024-06-12 11-15-18

According to the README the command should be: docker run -it --rm -v /code:/opt/myCode docker.cc.cert.org/redemption/distrib bash This should mount /opt/myCode from my host into the redemption docker container in /host/code

In this screenshot you can see that /host/code doesn't contain the files from my host drive and there isn't a /code dir. Also a myCode dir doesn't exist. Screenshot from 2024-06-12 11-19-35

donaldmurf commented 3 months ago

I updated the command from: docker run -it --rm -v /code:/myCode docker.cc.cert.org/redemption/distrib bash

to: docker run -it --rm -v /:/host/host_code docker.cc.cert.org/redemption/distrib bash

Example: docker run -it --rm -v /opt/myCode/:/host/host_code/ docker.cc.cert.org/redemption/distrib bash Screenshot from 2024-06-12 11-34-31 The picture shows a new dir called "host_code" in the docker container along with my host files being mounted

donaldmurf commented 3 months ago

Had to do another push because I had it has /home/host_code when it needs to be /host/host_code

donaldmurf commented 2 months ago

Screenshot from 2024-06-19 16-08-16

sei-dsvoboda commented 2 months ago

WRT Docker volumnes, you should use -v ./code:/myCode, or -v ${PWD}/code:/myCode. Specifying "/code" as the path to mount is an absolute path to "/code" on your host, which is not what you wanted.

sei-dsvoboda commented 2 months ago

BTW I just found the part of the README that uses "-v /code". I've fixed it.