File tree Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Expand file tree Collapse file tree 2 files changed +39
-4
lines changed Original file line number Diff line number Diff line change 3
3
Command Line Interface
4
4
======================
5
5
6
- A ``scanpipe `` command can be executed through the ``docker compose `` command line
7
- interface with::
6
+ The ``scanpipe `` command can be executed using the Docker Compose command line interface.
7
+
8
+ If the Docker Compose stack is already running, you can execute the command as follows:
9
+
10
+ .. code-block :: shell
8
11
9
12
docker compose exec -it web scanpipe COMMAND
10
13
11
- Alternatively, you can start a ``bash `` session in a new Docker container to execute
12
- multiple ``scanpipe `` commands::
14
+ If the ScanCode.io services are not currently running, you can use the following command:
15
+
16
+ .. code-block :: shell
17
+
18
+ docker compose run --rm web scanpipe COMMAND
19
+
20
+ Additionally, you can start a new Docker container and execute multiple
21
+ ``scanpipe `` commands within a ``bash `` session:
22
+
23
+ .. code-block :: shell
13
24
14
25
docker compose run web bash
15
26
scanpipe COMMAND
@@ -244,6 +255,8 @@ Optional arguments:
244
255
compatible with the XLSX and CSV formats.
245
256
It cannot be used when multiple formats are provided.
246
257
258
+ Refer to :ref: `Mount projects workspace <mount_projects_workspace_volume >` to access
259
+ your outputs on the host machine when running with Docker.
247
260
248
261
`$ scanpipe archive-project --project PROJECT `
249
262
----------------------------------------------
Original file line number Diff line number Diff line change @@ -30,6 +30,28 @@ the output file format with the ``–-format`` option:
30
30
``PROJECT ``'s :guilabel: `output/ ` directory. By default, JSON output
31
31
files are created when no file format is given.
32
32
33
+ .. _mount_projects_workspace_volume :
34
+
35
+ .. warning ::
36
+ When running with Docker, ensure that the output files workspace is assigned
37
+ to a volume to be accessible on the host machine.
38
+
39
+ To add local input files to a project using the :ref: `command_line_interface `,
40
+ additional arguments need to be passed to the ``docker compose `` command.
41
+
42
+ For example, using the following command will mount and make available the
43
+ projects workspace on the host at ``~/projects/ ``:
44
+
45
+ .. code-block :: bash
46
+
47
+ mkdir ~ /projects/
48
+ docker compose run --volume ~ /projects/:/var/scancodeio/workspace/projects/ \
49
+ web scanpipe output --project my_project --format json
50
+
51
+ Alternatively, you can also locate the Docker volumes directory on your host
52
+ machine. For instance, on Linux, it's typically found at:
53
+ ``/var/lib/docker/volumes/ ``.
54
+
33
55
Web UI
34
56
^^^^^^
35
57
When using the ScanCode.io web application, you can download the results of your
You can’t perform that action at this time.
0 commit comments