-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for running the app in a Docker image #9
Signed-off-by: Thomas Druez <tdruez@nexb.com>
- Loading branch information
Showing
5 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.. _docker_image: | ||
|
||
Docker image | ||
============ | ||
|
||
Get Docker | ||
---------- | ||
|
||
The first step is to download and install Docker on your platform. | ||
Refer to the following Docker documentation and choose the best installation | ||
path for you: `Get Docker <https://docs.docker.com/get-docker/>`_ | ||
|
||
Build the Image | ||
--------------- | ||
|
||
ScanCode.io is distributed with ``Dockerfile`` and ``docker-compose.yml`` files | ||
required for the creation of the Docker image. | ||
|
||
Build the image:: | ||
|
||
$ docker-compose build | ||
|
||
|
||
.. note:: | ||
The image will need to be re-build when the ScanCode.io app source code if | ||
modified or updated. | ||
|
||
Run the Image | ||
------------- | ||
|
||
Run your image as a container:: | ||
|
||
$ docker-compose up | ||
|
||
|
||
At this point, the ScanCode.io app should be running at port 8000 on your | ||
Docker host. | ||
Go to http://localhost:8000 on a web browser to access the web UI. | ||
|
||
You can also run a one-off ``scanpipe`` command through the Docker command line | ||
interface, for example:: | ||
|
||
$ docker-compose run web scanpipe create-project project_name | ||
|
||
|
||
.. note:: | ||
Refer to :ref:`scanpipe_command_line` for the full list of commands. | ||
|
||
Alternatively, you can connect to the Docker container ``bash`` and run commands | ||
from there:: | ||
|
||
$ docker-compose run web bash | ||
$ scanpipe create-project project_name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters