Skip to content

Commit b1d3ee5

Browse files
authored
Merge pull request #2325 from AyanSinhaMahapatra/docs-update
Update Installation Docs
2 parents 23054b0 + 3593418 commit b1d3ee5

File tree

5 files changed

+29
-10
lines changed

5 files changed

+29
-10
lines changed

INSTALL.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
Installation
33
============
44

5-
There are 3 main ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_.
5+
There are 4 main ways you can `install ScanCode <https://scancode-toolkit.readthedocs.io/en/latest/getting-started/install.html>`_.
66

77
- Installation as an Application: Downloading Releases (Recommended)
8+
- Docker Installation
89
- Installation as a library: via pip
910
- Installation from Source Code: Git Clone
1011

@@ -32,14 +33,30 @@ Installation as an Application : Downloading Releases
3233
- Linux/Mac : ``./scancode --help``
3334
- Windows : ``scancode --help``
3435

36+
Docker Installation
37+
-------------------
38+
39+
#. Download the Source Code as an archive from the `GitHub releases <https://github.com/nexB/scancode-toolkit/releases>`_ and unzip it, or via `git clone`.
40+
41+
#. Build the docker image from the `scancode-toolkit` directory.::
42+
43+
docker build -t scancode-toolkit .
44+
45+
#. Mount current working directory and run scan on mounted folder::
46+
47+
docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project
48+
49+
Note that the parameters *before* ``scancode-toolkit`` are used for docker,
50+
those after will be forwarded to scancode.
51+
3552
Installation as a library: via pip
3653
----------------------------------
3754

3855
#. Create a Python 3.6 Virtual Environment and activate the same::
3956

4057
virtualenv -p /usr/bin/python3.6 venv-scancode && source venv-scancode/bin/activate
4158

42-
#. Run ``pip install scancode-toolkit``
59+
#. Run ``pip install scancode-toolkit[full]``
4360

4461
Installation from Source Code: Git Clone
4562
----------------------------------------

docs/source/contribute/cut_new_release.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ How to cut a new release:
4242
- Run twine with ``twine upload dist/<path to the built wheel>``
4343
- Once uploaded check the published release at https://pypi.python.org/pypi/scancode-toolkit/
4444
- Then create a new fresh local virtualenv and test the wheel installation with:
45-
``pip install scancode-toolkit``
45+
``pip install scancode-toolkit[full]``

docs/source/getting-started/install.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ Installation via Docker:
246246
------------------------
247247

248248
You can install Scancode Toolkit by building a Docker image from the included Dockerfile.
249+
The prerequisite is a working `docker installation <https://docs.docker.com/engine/install/>`_.
249250

250251
Download the ScanCode-Toolkit Source Code
251252
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -258,7 +259,7 @@ Build the Docker image
258259
^^^^^^^^^^^^^^^^^^^^^^
259260

260261
The ``docker build`` command needs to run in the directory of the source code,
261-
make sure to ``cd`` into the correct directory.
262+
make sure to ``cd`` into the correct directory.::
262263

263264
cd scancode-toolkit
264265
docker build -t scancode-toolkit .
@@ -268,17 +269,17 @@ Run using Docker
268269

269270
The docker image will forward all arguments it receives directly to the ``scancode`` command.
270271

271-
Display help:
272+
Display help::
272273

273274
docker run scancode-toolkit --help
274275

275-
Mount current working directory and run scan on mounted folder:
276+
Mount current working directory and run scan on mounted folder::
276277

277278
docker run -v $PWD/:/project scancode-toolkit -clpeui --json-pp /project/result.json /project
278279

279280
This will mount your current working from the host into ``/project`` in the container
280281
and then scan the contents. The output ``result.json`` will be written back to your
281-
corrent working directory on the host.
282+
current working directory on the host.
282283

283284
Note that the parameters *before* ``scancode-toolkit`` are used for docker,
284285
those after will be forwarded to scancode.
@@ -361,7 +362,7 @@ For more information on Python virtualenv, visit this `page <https://docs.python
361362

362363
source venv-scancode/bin/activate
363364

364-
#. Run ``pip install scancode-toolkit`` to install the latest version of Scancode.
365+
#. Run ``pip install scancode-toolkit[full]`` to install the latest version of Scancode.
365366

366367
.. NOTE::
367368

docs/source/getting-started/newcomer.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,13 @@ Before you start using Scancode
8282
is created.
8383

8484
:ref:`app_install`
85+
:ref:`docker_install`
8586
:ref:`pip_install`
8687
:ref:`source_code_install`
8788

8889

8990
#. Now you can either follow the instructions for the recommended :ref:`app_install` method ,
90-
or run ``pip install scancode-toolkit`` like that in the :ref:`pip_install` documentation.
91+
or run ``pip install scancode-toolkit[full]`` like that in the :ref:`pip_install` documentation.
9192
Alternatively, you can also :ref:`source_code_install`.
9293

9394
#. Run ``scancode -h`` to make sure Scancode was installed properly.

docs/source/tutorials/how_to_run_a_scan.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Setting up Scancode Toolkit
3636

3737
Get ScanCode Toolkit from ``pip``::
3838

39-
pip install scancode-toolkit
39+
pip install scancode-toolkit[full]
4040

4141
.. Note::
4242

0 commit comments

Comments
 (0)