You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme-docs/DOCKER.md
+24-11Lines changed: 24 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The docker-compose.yml file in this repository is fully functional to evaluate DefectDojo in your local environment.
4
4
5
-
Although Docker Compose is one of the supported installation methods to deploy a containerized DefectDojo in a production environment, the docker-compose.yml file is not intended for production use without first customizing it to your particular situation.
5
+
Although Docker Compose is one of the supported installation methods to deploy a containerized DefectDojo in a production environment, the docker-compose.yml file is not intended for production use without first customizing it to your particular situation.
6
6
7
7
[Running in Production](https://docs.defectdojo.com/en/open_source/installation/running-in-production/) gives advice on which adjustments are useful for performance and operational reliability.
8
8
@@ -144,10 +144,9 @@ Make sure you write down the first password generated as you'll need it when re-
144
144
## Option to change the password
145
145
* If you dont have admin password use the below command to change the password.
146
146
* After starting the container and open another tab in the same folder.
147
-
* django-defectdojo-uwsgi-1 -- name obtained from running containers using ```zsh docker ps ``` command
defectdojo/defectdojo-nginx 1.0.0 bc9c5f7bb4e5 About an hour ago 191MB
201
+
...
195
202
```
196
203
197
204
* This will show on which tagged images the containers are running:
198
205
199
206
```
207
+
$ docker compose ps
208
+
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
209
+
dd-nginx-1 defectdojo/defectdojo-nginx:latest "/entrypoint-nginx.sh" nginx About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp, [::]:8080->8080/tcp,
210
+
...
211
+
212
+
or
213
+
200
214
$ docker ps
201
215
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
202
216
aedc404d6dee defectdojo/defectdojo-nginx:1.0.0 "/entrypoint-nginx.sh" 2 minutes ago Up 2 minutes 80/tcp, 0.0.0.0:8080->8080/tcp django-defectdojo_nginx_1
217
+
...
203
218
```
204
219
205
-
206
220
## Clean up Docker Compose
207
221
208
222
Removes all containers
@@ -231,7 +245,7 @@ To secure the application by https, follow those steps
231
245
ssl_certificate /etc/nginx/ssl/nginx.crt
232
246
ssl_certificate_key /etc/nginx/ssl/nginx.key;
233
247
```
234
-
*set the GENERATE_TLS_CERTIFICATE != True in the docker-compose.override.https.yml
248
+
*set the GENERATE_TLS_CERTIFICATE != True in the docker-compose.override.https.yml
235
249
* Protect your private key from other users:
236
250
```
237
251
chmod 400 nginx/*.key
@@ -286,12 +300,11 @@ If you want to enter the container to run more tests or a single test case, leav
286
300
docker/setEnv.sh dev
287
301
docker compose up
288
302
```
289
-
Then
303
+
Then
290
304
```
291
-
docker ps
292
-
#find the name of the uwsgi container from the above command
293
-
docker exec -ti [container-name] bash
305
+
docker exec -it uwsgi /bin/bash
294
306
```
307
+
You're now inside the container.
295
308
Rerun all the tests:
296
309
297
310
```
@@ -310,7 +323,7 @@ Run a single test. Example:
310
323
python manage.py test unittests.tools.test_dependency_check_parser.TestDependencyCheckParser.test_parse_file_with_no_vulnerabilities_has_no_findings --keepdb
311
324
```
312
325
313
-
For docker compose stack, there is a convenience script (`run-unittest.sh`) capable of running a single test class.
326
+
For docker compose stack, there is a convenience script (`run-unittest.sh`) capable of running a single test class.
314
327
You will need to provide a test case (`--test-case`). Example:
315
328
316
329
```
@@ -329,7 +342,7 @@ NB: the first time you run it, initializing the database may be too long for the
0 commit comments