|
1 | 1 | # Datatracker Development in Docker |
2 | 2 |
|
| 3 | +## Getting started |
| 4 | + |
3 | 5 | 1. [Set up Docker](https://docs.docker.com/get-started/) on your preferred |
4 | 6 | platform. |
5 | 7 |
|
|
12 | 14 | svn co https://svn.ietf.org/svn/tools/ietfdb/trunk |
13 | 15 | cd trunk |
14 | 16 |
|
15 | | -3. **TEMPORARY:** Replace the contents of the `docker` directory with Lars' |
16 | | - files. |
| 17 | +3. **TEMPORARY:** Replace the contents of the `docker` directory with [Lars' |
| 18 | + files](https://svn.ietf.org/svn/tools/ietfdb/personal/lars/7.39.1.dev0/docker/). |
17 | 19 |
|
18 | | -4. **TEMPORARY:** Until Lars' changes have been merged and a docker image is |
19 | | - available for download, you will need to build it locally: |
| 20 | +4. **TEMPORARY:** Until [Lars' |
| 21 | + changes](https://svn.ietf.org/svn/tools/ietfdb/personal/lars/7.39.1.dev0/docker/) |
| 22 | + have been merged and a docker image is available for download, you will need |
| 23 | + to build it locally: |
20 | 24 |
|
21 | 25 | docker/build |
22 | 26 |
|
23 | 27 | This will take a while, but only needs to be done once. |
24 | 28 |
|
25 | 29 | 5. Use the `docker/run` script to start the datatracker container. You will be |
26 | 30 | dropped into a shell from which you can start the datatracker and execute |
27 | | - related commands as usual, for example: |
| 31 | + related commands as usual, for example |
28 | 32 |
|
29 | 33 | ietf/manage.py runserver 0.0.0.0:8000 |
30 | 34 |
|
| 35 | + to start the datatracker. |
| 36 | + |
| 37 | + You can also pass additional arguments to `docker/run`, in which case they |
| 38 | + will be executed in the container (instead of a shell being started.) |
| 39 | + |
31 | 40 | If you do not already have a copy of the IETF database available in the |
32 | 41 | `data` directory, one will be downloaded and imported the first time you run |
33 | 42 | `docker/run`. This will take some time. |
34 | 43 |
|
35 | 44 | Once the datatracker has started, you should be able to open |
36 | 45 | [http://localhost:8000](http://localhost:8000) in a browser and see the |
37 | | - landing page. |
| 46 | + landing page. |
| 47 | + |
| 48 | +## Troubleshooting |
| 49 | + |
| 50 | +- If the database fails to start, the cause is usually an incompatibility |
| 51 | + between the database that last touched the files in `data/mysql` and the |
| 52 | + database running inside the docker container. |
| 53 | + |
| 54 | + The solution is to blow away your existing database (`rm -rf data/mysql`). A |
| 55 | + fresh copy will be retrieved and imported next time you do `docker/run`, which |
| 56 | + should resolve this issue. |
0 commit comments