Brightspot Local Development Docker Containers
50K+
These containers are intended for local development only, and are optimized for this use case. For production use, please contact Brightspot.
Note
As of July 24th, 2025, container image tags without a build number (e.g. `brightspot/tomcat:9.0-jdk11`) are deprecated and will no longer be supported. You should now be using a fully-qualified image tag with a build number (e.g. `brightspot/tomcat:9.0.107-jdk11-57`) in your project. See [Deprecated Tags](#deprecated-tags) for more details.
The latest releases and their recommended Docker Compose configuration will always be documented in this README.
docker-compose.yml with the following contents (replace
"${my-project}" with your project name or the appropriate values):services:
mysql:
image: brightspot/mysql:percona80-19
ports:
- 3306:3306
volumes:
- mysql-data:/var/lib/mysql
- mysql-logs:/var/log/mysql
opensearch:
image: brightspot/opensearch:3.3.2-schema3-28
environment:
- discovery.type=single-node
ports:
- 9200:9200
volumes:
- opensearch-data:/usr/share/opensearch/data
opensearch-dashboards:
image: brightspot/opensearch-dashboards:3.3.0-27
depends_on:
opensearch:
condition: service_healthy
ports:
- 5601:5601
environment:
- OPENSEARCH_HOSTS=["http://opensearch:9200"]
tomcat:
image: brightspot/tomcat:10.1.57-jdk11-97
hostname: "${my-project}.brightspot"
depends_on:
mysql:
condition: service_healthy
opensearch:
condition: service_healthy
ports:
- 5005:5005
- 9010:9010
volumes:
- .:/code:cached
- $HOME/.aws/credentials:/etc/aws/credentials:cached
- storage-data:/servers/tomcat/storage
environment:
- ROOT_WAR=/code/web/build/libs/${my-project}-web-1.0.0-SNAPSHOT.war
- CONTEXT_PROPERTIES=/code/docker-context.properties
- CONTEXT_PROPERTIES_OVERRIDES=/code/docker-context-overrides.properties
- LOGGING_PROPERTIES=/code/docker-logging.properties
- AWS_PROFILE=psd-${my-project}
- ENABLE_JACOCO=false
- ENABLE_JFR=false
apache:
image: brightspot/apache:2.4-dims3.3.31-69
depends_on:
tomcat:
condition: service_healthy
ports:
- 80:80
- 443:443
volumes:
- storage-data:/var/www/localhost/htdocs/storage
volumes:
mysql-data:
mysql-logs:
opensearch-data:
storage-data:
docker-context.properties with the following contents:Note: These context properties are specific to brightspot/opensearch:3.3.2-schema3-28. Replace them with the
appropriate properties for your search database if your project still uses Solr (brightspot/solr images
remain available).
dari/database/brightspot/delegate/opensearch/class=com.brightspot.opensearch.OpenSearchDatabase
dari/database/brightspot/delegate/opensearch/client/class=com.brightspot.opensearch.common.HttpOpenSearchClientSupplier
dari/database/brightspot/delegate/opensearch/client/baseServerUrl=http://opensearch:9200
dari/database/brightspot/delegate/opensearch/groups=-* +cms.content.searchable
dari/database/brightspot/delegate/opensearch/index=brightspot-search
dari/database/brightspot/delegate/opensearch/saveData=false
docker-compose up or docker-compose up -d. See the
docker-compose documentation for other options.ROOT_WAR contains the path in the container to the project war file.
The war is expanded into webapps/ROOT when the container starts and again on each reloader-triggered restart, whenever the war is newer than the expanded copy. After rebuilding the war, run docker-compose restart tomcat to deploy it.
Whether to remove WEB-INF/lib/HikariCP*.jar from the expanded war so the HikariCP provided in tomcat/lib is used, matching the production containers. Set to false to keep the war's own copy.
Defaults to true.
REMOVE_HIKARI=false
CONTEXT_PROPERTIES contains the path to a properties file that will be parsed and added as <Environment>
elements in tomcat's context.xml.
For example, docker-context.properties:
dari/debugUsername=debug
dari/debugPassword=12345
dari/debugRealm=Brightspot-Docker
is transformed into context.xml:
<Environment name="dari/debugUsername" value="debug" type="java.lang.String"/>
<Environment name="dari/debugPassword" value="12345" type="java.lang.String"/>
<Environment name="dari/debugRealm" value="Brightspot-Docker" type="java.lang.String"/>
CONTEXT_PROPERTIES_OVERRIDES contains the path to a properties file that will be parsed and added after the
CONTEXT_PROPERTIES (see above). This allows you to maintain a shared, project-wide configuration and to add
local (i.e., not version controlled) values.
Note: If you duplicate values between CONTEXT_PROPERTIES and CONTEXT_PROPERTIES_OVERRIDES, the
original value from CONTEXT_PROPERTIES will be replaced with the value in CONTEXT_PROPERTIES_OVERRIDES. If
you need to replace the entire configuration, you can alternatively set a different path for
CONTEXT_PROPERTIES in your docker-compose.override.yml with the modified version instead.
LOGGING_PROPERTIES contains the path to a properties file that will be appended to tomcat's
logging.properties.
For example, docker-logging.properties:
com.my.package.level = FINE
com.my.package.MyClass.level = FINE
com.other.package.NoisyClass.level = SEVERE
INIT_SH contains the path to an initialization script that will be executed when the container starts.
Example:
environment:
- INIT_SH=/code/docker-tomcat-init.sh
NOTE: Make sure docker-tomcat-init.sh is executable!
Access to AWS services via your host credentials file is a two-step process:
Ensure that your ~/.aws/credentials file is mounted as /etc/aws/credentials in the docker container
(See: docker-compose.yml above)
Add lines like
- AWS_PROFILE=psd-${my-project}
- AWS_REGION=us-east-1
to your docker-compose.yml under environment: and run docker-compose up to apply the change. Note that
us-east-1 is already provided as the default region, so you should only have to override this if you need to
test with a different region.
Now any changes to your host credentials file (via beam credentials, for example) will be accessible to the
DefaultAWSCredentialsProviderChain in the docker container.
Enables Java Flight Recorder on the Tomcat process.
If Tomcat is started with ENABLE_JFR=true, a JFR dump can be generated using the command:
docker-compose exec tomcat jfr-dump.sh
By default, this will create a file in /code. Use the JFR_DIR environment variable to override this default
if desired, or invoke jfr-dump.sh with a filename as the first argument.
The JFR dump file can be analyzed using JDK Mission Control.
Percentage of the host's total memory to allocate to the Tomcat JVM heap (-Xms/-Xmx). Must be an integer between 1 and 100. Invalid values fall back to the default.
Defaults to 40.
HEAP_PERCENT=25
Enable JaCoCo for code coverage analysis. Note this will disable the Reloader.
ENABLE_JACOCO=true
Options to pass to Jacoco. These will automatically be included in CATALINA_OPTS.
Defaults to append=false.
JACOCO_ARGS=destfile=/code/web/build/jacoco/playwright.exec,append=false,classdumpdir=/code/web/build/jacoco-classes/
If TEMPLATE_CONFIG contains the path to a YAML file (for instance
TEMPLATE_CONFIG=/code/docker-template.yml), the file will be used to populate the ERB templates listed in
/etc/docker/templates.
For example:
data:
brightspot:
extra_dari_db: otherdatabase
extra_resources:
- name: database1 # Required
minimum_idle: 4 # Default: 2
idle_timeout: 20000 # Default: 10000
maximum_pool_size: 16 # Default: 12
max_lifetime: 60000 # Default: 30000
connection_timeout: 2000 # Default: 1000
host: host # Default: localhost
port: 3306 # Default: 3306
database_name: database1 # Default: 'name' property value
user: user # Required
password: password # Required
- name: database2
minimum_idle: 4
idle_timeout: 20000
maximum_pool_size: 16
max_lifetime: 60000
connection_timeout: 2000
host: host
port: 3306
database_name: database2
user: user
password: password
This populates the @data['brightspot']['extra_dari_db'] setting found in
/servers/tomcat/conf/context.xml.erb and /servers/tomcat/conf/server.xml.erb.
It will also create additional, extra resource links in /servers/tomcat/conf/server.xml.erb
Future template configs will be documented here as they are developed.
SSL is enabled on the Apache server. In order to trust the certificate so any domain will work, run the following commands on your Mac:
curl -O https://psddev.s3.amazonaws.com/brightspot-docker-ca.pem
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain brightspot-docker-ca.pem
HTTP Request caching is provided via Apache mod_cache only if Cache-Control headers are found on the response.
To disable mod_cache altogether, add an environment variable to the apache container: DISABLE_CACHE=true
When mod_dims cannot fetch a source image, or a /dims4/ request has a bad signature or arguments, it responds with a placeholder image baked into the apache container (dims-no-image.png, the same one the production containers serve) and the matching error status. To use a different placeholder, set DIMS_NO_IMAGE_URL on the apache container to an http:// or file:/// URL.
The only purpose of the hostname property is to provide a consistent hostname that can be published in site
settings as a task host.
Remote debugging is exposed on port 5005.
JMX provides a standard way to monitor Brightspot's performance, resource consumption, and manage various runtime aspects. This is enabled by default.
Connect to localhost:9010 using a tool such as JConsole or
VisualVM.
This port can be customized with the environment variable JMX_PORT. Just make sure you use the same value on
both sides in the ports configuration - it must be the same port inside and outside the Docker network.
Note: if you are using version 4.1.8 or newer of the Brightspot Gradle Plugin and have added 'systemProp.codePath=/code' to your gradle.properties, this step is unnecessary.
Create a second file docker-compose.override.yml in the root of your project with the following contents:
services:
tomcat:
volumes:
- $PWD:$PWD:cached
This will allow Brightspot to scan the host filesystem to automatically recompile Java source files.
Add this function to your ~/.bash_profile:
function d() {
docker-compose exec $1 bash --login;
}
Use this to log in to each container by name from the project directory, for example:
$ d tomcat
[brightspot tomcat:~]$ cat /servers/tomcat/conf/context.xml
These commands can be executed on the command line if your current working directory is inside the project.
docker-compose restart tomcatdocker-compose stopdocker-compose start or docker-compose start -d to detach and run it in the backgrounddocker-compose downdocker volume prunedocker-sync-stack startdocker-compose logs -f tomcatdocker-compose exec tomcat bashdocker-compose stop or Ctrl+C if running in the foregrounddocker-compose run mysql restore mysql -e qa --user ${UserName} --project ${DatabaseName} --account ${Account} --renamedb ${Project} --region=${Region}
docker-compose run mysql restore mysql -e qa --user bob --project myproject --account psd-myproject --renamedb myproject --region=us-west-1docker-compose startFor projects running mysql5.6 or percona5.6, follow these steps to upgrade to percona57 and then
optionally to percona80. Every user will need to do follow these steps individually, as every user has their
own independent MySQL data.
If you don't care about your existing data, you can skip these steps and just delete your mysql volume, then
update the mysql image to percona57 or percona80 as desired.
If existing data is important, make a backup of your current MySQL volume.
Shut down Docker
$ docker compose down
Update the mysql image in docker-compose.yml to percona57-3
mysql:
image: brightspot/mysql:percona57-3
Run the following:
$ docker compose up -d mysql
$ docker compose exec mysql mysql_upgrade
$ docker compose down mysql
Start Docker as normal and ensure the CMS and frontend load. At this point you have successfully upgraded to Percona 5.7 and can stop.
If you want to continue and upgrade to percona80, run the following:
$ docker compose exec mysql mysql --user=root --password
mysql> SET GLOBAL innodb_fast_shutdown = 0;
mysql> exit
then shut down Docker:
$ docker compose down
Update the mysql image in docker-compose.yml to percona80-11
mysql:
image: brightspot/mysql:percona80-11
Run the following (the mysql uid changed so existing files need to be updated to the new uid):
$ docker compose run --rm mysql sh
$ sudo find /var/lib/mysql -user 999 -exec chown mysql {} \;
$ sudo find /var/lib/mysql -group 999 -exec chown :mysql {} \;
Test mysql
$ docker compose up mysql
If mysql fails to start with something like
[ERROR] [MY-012526] [InnoDB] Upgrade is not supported after a crash or shutdown with innodb_fast_shutdown = 2. This redo log was created with MySQL 5.7.32-35, and it appears logically non empty. Please follow the instructions at http://dev.mysql.com/doc/refman/8.0/en/upgrading.html
then run the following:
$ docker compose run --rm mysql sh
$ rm /var/lib/mysql/ib_logfile0
$ rm /var/lib/mysql/ib_logfile1
$ mkdir '/var/lib/mysql/#innodb_redo'
otherwise, terminate the mysql container.
Start Docker as normal and ensure the CMS and frontend load.
The final tags without build numbers of each of these images have corresponding tags that do include the build number. If, for some unforeseen reason, you are unable to upgrade to the recommended releases, or if you need to roll back to the latest before this change was made, you can use these tags instead. Note that the legacy tags may be deleted in the future.
This deprecation is an intentional change to disable "automatic upgrades," so you will need to explicitly update these going forward.
Also note that less precise legacy tags were also previously supported. For example,
brightspot/tomcat:8.5.69-jdk8-40 had aliases that included 8.5.69-jdk8, 8.5-jdk8, 8-jdk8, and simply
8. These "partial" tags are no longer supported, and may also be deleted in the future.
Note
The following table is only provided as a reference to document the deprecated "automatic upgrade" tags, supported prior to July 24th, 2025. It is strongly recommended to upgrade to the current tags and configuration, documented above.
| Image | Deprecated Tag | Alias Including Build Number |
|---|---|---|
| apache | 2.4-dims3.3.25 | 2.4-dims3.3.25-40 |
| mysql | mysql5.6 | mysql5.6-0 |
| mysql | percona57 | percona57-0 |
| mysql | percona80 | percona80-7 |
| solr | 4.8.1 | 4.8.1-47 |
| solr | 7.7.3 | 7.7.3-47 |
| solr | 8.8.2 | 8.8.2-47 |
| solr | 8.9.0 | 8.9.0-47 |
| solr | 8.11.1 | 8.11.1-47 |
| solr | 9.3.0 | 9.3.0-47 |
| solr | 9.6.0 | 9.6.0-47 |
| tomcat | 8.5.69-jdk11 | 8.5.69-jdk11-53 |
| tomcat | 9.0.50-jdk11 | 9.0.50-jdk11-53 |
| tomcat | 10.1.35-jdk11 | 10.1.35-jdk11-53 |
| tomcat | 10.1.35-jdk17 | 10.1.35-jdk17-53 |
Content type
Image
Digest
sha256:70d8115fa…
Size
288.5 MB
Last updated
13 days ago
docker pull brightspot/tomcat:10.1.57-jdk21-97