2018-02-08 23:16:43 -06:00
|
|
|
---
|
|
|
|
title: Deploying Docker Container
|
|
|
|
category: Getting Started
|
|
|
|
chapter: 1
|
|
|
|
order: 1
|
|
|
|
---
|
|
|
|
|
|
|
|
Deploying with Docker is the easiest and fastest method of getting started. No prerequisites are required
|
2019-09-28 22:59:32 -05:00
|
|
|
other than a modern version of Docker.
|
2018-02-08 23:16:43 -06:00
|
|
|
|
|
|
|
> The 'latest' tag in Docker Hub will always refer to the latest stable GA release. Consult the GitHub repo
|
|
|
|
> for instructions on how to run untested snapshot releases.
|
|
|
|
|
2020-12-26 00:25:59 -06:00
|
|
|
### Container Requirements (API Server)
|
2019-10-02 12:03:46 -05:00
|
|
|
|
2020-11-20 11:04:16 +01:00
|
|
|
| Minimum | Recommended |
|
|
|
|
| :---------- | :---------- |
|
|
|
|
| 4.5GB RAM | 16GB RAM |
|
2019-10-02 12:03:46 -05:00
|
|
|
| 2 CPU cores | 4 CPU cores |
|
|
|
|
|
2020-12-26 00:25:59 -06:00
|
|
|
### Container Requirements (Front End)
|
|
|
|
|
|
|
|
| Minimum | Recommended |
|
|
|
|
| :---------- | :---------- |
|
|
|
|
| 512MB RAM | 1GB RAM |
|
|
|
|
| 1 CPU cores | 2 CPU cores |
|
|
|
|
|
|
|
|
### Quickstart (Docker Compose)
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Downloads the latest Docker Compose file
|
|
|
|
curl -LO https://dependencytrack.org/docker-compose.yml
|
|
|
|
|
|
|
|
# Starts the stack using Docker Compose
|
|
|
|
docker-compose up -d
|
|
|
|
```
|
|
|
|
|
|
|
|
### Quickstart (Docker Swarm)
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# Downloads the latest Docker Compose file
|
|
|
|
curl -LO https://dependencytrack.org/docker-compose.yml
|
|
|
|
|
|
|
|
# Initializes Docker Swarm (if not previously initialized)
|
|
|
|
docker swarm init
|
|
|
|
|
|
|
|
# Starts the stack using Docker Swarm
|
|
|
|
docker stack deploy -c docker-compose.yml dtrack
|
|
|
|
```
|
2019-10-02 12:03:46 -05:00
|
|
|
|
2018-12-12 01:51:20 -06:00
|
|
|
### Quickstart (Manual Execution)
|
2018-02-08 23:16:43 -06:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# Pull the image from the Docker Hub OWASP repo
|
2020-12-27 22:16:46 -06:00
|
|
|
docker pull dependencytrack/bundled
|
2018-02-08 23:16:43 -06:00
|
|
|
|
|
|
|
# Creates a dedicated volume where data can be stored outside the container
|
2018-03-13 14:28:28 -05:00
|
|
|
docker volume create --name dependency-track
|
2018-02-08 23:16:43 -06:00
|
|
|
|
2020-12-26 00:25:59 -06:00
|
|
|
# Run the bundled container with 8GB RAM on port 8080
|
|
|
|
docker run -d -m 8192m -p 8080:8080 --name dependency-track -v dependency-track:/data dependencytrack/bundled
|
2018-03-13 14:21:15 -05:00
|
|
|
```
|
|
|
|
|
2018-12-12 01:51:20 -06:00
|
|
|
### Docker Compose (Automated / Orchestration)
|
2018-03-13 14:28:28 -05:00
|
|
|
|
2018-12-12 01:51:20 -06:00
|
|
|
The preferred method for production environments is to use docker-compose.yml with a corresponding
|
|
|
|
database container (Postgres, MySQL, or Microsoft SQL). The following is an example YAML file that
|
|
|
|
can be used with `docker-compose` or `docker stack deploy`.
|
|
|
|
|
|
|
|
```yaml
|
2020-03-01 22:22:13 -06:00
|
|
|
version: '3.7'
|
2020-12-21 01:26:29 -06:00
|
|
|
|
|
|
|
#####################################################
|
|
|
|
# This Docker Compose file contains two services
|
|
|
|
# Dependency-Track API Server
|
|
|
|
# Dependency-Track FrontEnd
|
|
|
|
#####################################################
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
dependency-track:
|
|
|
|
|
2018-12-12 01:51:20 -06:00
|
|
|
services:
|
2020-12-21 01:26:29 -06:00
|
|
|
dtrack-apiserver:
|
|
|
|
image: dependencytrack/apiserver
|
|
|
|
# environment:
|
2018-12-12 01:51:20 -06:00
|
|
|
# The Dependency-Track container can be configured using any of the
|
|
|
|
# available configuration properties defined in:
|
|
|
|
# https://docs.dependencytrack.org/getting-started/configuration/
|
|
|
|
# All properties are upper case with periods replaced by underscores.
|
|
|
|
#
|
|
|
|
# Database Properties
|
|
|
|
# - ALPINE_DATABASE_MODE=external
|
|
|
|
# - ALPINE_DATABASE_URL=jdbc:postgresql://postgres10:5432/dtrack
|
|
|
|
# - ALPINE_DATABASE_DRIVER=org.postgresql.Driver
|
|
|
|
# - ALPINE_DATABASE_USERNAME=dtrack
|
|
|
|
# - ALPINE_DATABASE_PASSWORD=changeme
|
2019-01-30 23:33:13 -06:00
|
|
|
# - ALPINE_DATABASE_POOL_ENABLED=true
|
2020-12-21 01:26:29 -06:00
|
|
|
# - ALPINE_DATABASE_POOL_MAX_SIZE=10
|
2019-01-30 23:33:13 -06:00
|
|
|
# - ALPINE_DATABASE_POOL_IDLE_TIMEOUT=600000
|
|
|
|
# - ALPINE_DATABASE_POOL_MAX_LIFETIME=600000
|
2018-12-12 01:51:20 -06:00
|
|
|
#
|
|
|
|
# Optional LDAP Properties
|
2020-12-21 01:26:29 -06:00
|
|
|
# - ALPINE_LDAP_ENABLED=true
|
2018-12-12 01:51:20 -06:00
|
|
|
# - ALPINE_LDAP_SERVER_URL=ldap://ldap.example.com:389
|
|
|
|
# - ALPINE_LDAP_BASEDN=dc=example,dc=com
|
|
|
|
# - ALPINE_LDAP_SECURITY_AUTH=simple
|
|
|
|
# - ALPINE_LDAP_BIND_USERNAME=
|
|
|
|
# - ALPINE_LDAP_BIND_PASSWORD=
|
|
|
|
# - ALPINE_LDAP_AUTH_USERNAME_FORMAT=%s@example.com
|
|
|
|
# - ALPINE_LDAP_ATTRIBUTE_NAME=userPrincipalName
|
|
|
|
# - ALPINE_LDAP_ATTRIBUTE_MAIL=mail
|
|
|
|
# - ALPINE_LDAP_GROUPS_FILTER=(&(objectClass=group)(objectCategory=Group))
|
|
|
|
# - ALPINE_LDAP_USER_GROUPS_FILTER=(member:1.2.840.113556.1.4.1941:={USER_DN})
|
2019-06-02 00:58:45 -05:00
|
|
|
# - ALPINE_LDAP_GROUPS_SEARCH_FILTER=(&(objectClass=group)(objectCategory=Group)(cn=*{SEARCH_TERM}*))
|
|
|
|
# - ALPINE_LDAP_USERS_SEARCH_FILTER=(&(objectClass=user)(objectCategory=Person)(cn=*{SEARCH_TERM}*))
|
2018-12-12 01:51:20 -06:00
|
|
|
# - ALPINE_LDAP_USER_PROVISIONING=false
|
|
|
|
# - ALPINE_LDAP_TEAM_SYNCHRONIZATION=false
|
|
|
|
#
|
2020-12-21 01:26:29 -06:00
|
|
|
# Optional OpenID Connect (OIDC) Properties
|
|
|
|
# - ALPINE_OIDC_ENABLED=true
|
|
|
|
# - ALPINE_OIDC_ISSUER=https://auth.example.com/auth/realms/example
|
|
|
|
# - ALPINE_OIDC_USERNAME_CLAIM=preferred_username
|
|
|
|
# - ALPINE_OIDC_TEAMS_CLAIM=groups
|
|
|
|
# - ALPINE_OIDC_USER_PROVISIONING=true
|
|
|
|
# - ALPINE_OIDC_TEAM_SYNCHRONIZATION=true
|
|
|
|
#
|
2018-12-12 01:51:20 -06:00
|
|
|
# Optional HTTP Proxy Settings
|
|
|
|
# - ALPINE_HTTP_PROXY_ADDRESS=proxy.example.com
|
|
|
|
# - ALPINE_HTTP_PROXY_PORT=8888
|
|
|
|
# - ALPINE_HTTP_PROXY_USERNAME=
|
|
|
|
# - ALPINE_HTTP_PROXY_PASSWORD=
|
2020-06-03 07:07:00 +05:30
|
|
|
# - ALPINE_NO_PROXY=
|
2019-04-16 17:06:01 -05:00
|
|
|
#
|
|
|
|
# Optional Cross-Origin Resource Sharing (CORS) Headers
|
|
|
|
# - ALPINE_CORS_ENABLED=true
|
|
|
|
# - ALPINE_CORS_ALLOW_ORIGIN=*
|
2021-02-03 11:44:09 +01:00
|
|
|
# - ALPINE_CORS_ALLOW_METHODS=GET, POST, PUT, DELETE, OPTIONS
|
2019-04-16 17:06:01 -05:00
|
|
|
# - ALPINE_CORS_ALLOW_HEADERS=Origin, Content-Type, Authorization, X-Requested-With, Content-Length, Accept, Origin, X-Api-Key, X-Total-Count, *
|
|
|
|
# - ALPINE_CORS_EXPOSE_HEADERS=Origin, Content-Type, Authorization, X-Requested-With, Content-Length, Accept, Origin, X-Api-Key, X-Total-Count
|
|
|
|
# - ALPINE_CORS_ALLOW_CREDENTIALS=true
|
|
|
|
# - ALPINE_CORS_MAX_AGE=3600
|
2020-03-01 22:22:13 -06:00
|
|
|
deploy:
|
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: 12288m
|
|
|
|
reservations:
|
|
|
|
memory: 8192m
|
|
|
|
restart_policy:
|
|
|
|
condition: on-failure
|
2018-12-12 01:51:20 -06:00
|
|
|
ports:
|
2020-12-21 01:26:29 -06:00
|
|
|
- '8081:8080'
|
2018-12-12 01:51:20 -06:00
|
|
|
volumes:
|
2020-12-21 01:26:29 -06:00
|
|
|
- 'dependency-track:/data'
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
dtrack-frontend:
|
|
|
|
image: dependencytrack/frontend
|
|
|
|
depends_on:
|
|
|
|
- dtrack-apiserver
|
|
|
|
environment:
|
|
|
|
- API_BASE_URL=http://localhost:8081
|
|
|
|
# - "OIDC_ISSUER="
|
|
|
|
# - "OIDC_CLIENT_ID="
|
|
|
|
# - "OIDC_SCOPE="
|
|
|
|
# - "OIDC_FLOW="
|
|
|
|
# volumes:
|
|
|
|
# - "/host/path/to/config.json:/app/static/config.json"
|
|
|
|
ports:
|
|
|
|
- "8080:80"
|
|
|
|
restart: unless-stopped
|
2018-12-12 01:51:20 -06:00
|
|
|
```
|
|
|
|
|
|
|
|
### Bundled JDBC Drivers
|
|
|
|
|
2021-01-25 21:44:41 -06:00
|
|
|
The following JDBC Drivers are included with Dependency-Track.
|
2018-12-12 01:51:20 -06:00
|
|
|
|
2021-01-25 21:44:41 -06:00
|
|
|
| Driver | Class |
|
|
|
|
| ------------- | -------------------------------------------- |
|
|
|
|
| Microsoft SQL | com.microsoft.sqlserver.jdbc.SQLServerDriver |
|
|
|
|
| MySQL | com.mysql.jdbc.Driver |
|
|
|
|
| PostgreSQL | org.postgresql.Driver |
|