mirror of
https://github.com/scr34m/php-malware-scanner.git
synced 2026-06-16 12:30:35 +00:00
Add Docker support with documentation
This commit is contained in:
34
README.md
34
README.md
@@ -146,3 +146,37 @@ Licensing
|
||||
---------
|
||||
|
||||
PHP malware scanner is [licensed](https://github.com/scr34m/php-malware-scanner/blob/master/LICENSE.txt) under the GNU General Public License v3.
|
||||
|
||||
Docker Usage
|
||||
-----------
|
||||
|
||||
You can also run the scanner using Docker:
|
||||
|
||||
1. Build the image:
|
||||
```bash
|
||||
docker build -t php-malware-scanner .
|
||||
```
|
||||
|
||||
2. Scan a directory:
|
||||
```bash
|
||||
docker run -v /path/to/scan:/code php-malware-scanner -d /code
|
||||
```
|
||||
|
||||
For example, to scan a WordPress installation:
|
||||
```bash
|
||||
docker run -v /var/www/html:/code php-malware-scanner -d /code -j 6.4.1
|
||||
```
|
||||
|
||||
Common usage with flags:
|
||||
```bash
|
||||
# Show only infected files (hide OK status)
|
||||
docker run -v /path/to/scan:/code php-malware-scanner -d /code -k
|
||||
|
||||
# Show comments for matched patterns
|
||||
docker run -v /path/to/scan:/code php-malware-scanner -d /code -c
|
||||
|
||||
# Show MD5 hashes and continue after first match
|
||||
docker run -v /path/to/scan:/code php-malware-scanner -d /code -m -s
|
||||
```
|
||||
|
||||
The `/code` directory inside the container is where your files will be mounted for scanning.
|
||||
|
||||
Reference in New Issue
Block a user