This dotCMS developer image is a docker image that contains all the services that are required to run dotCMS — including Postgres and Opensearch.
Importantly, this image can be used to clone an existing dotCMS instance.
TL;DR — Starting Fresh#
To start a clean, fresh dotCMS instance, cut and paste the snippet below into your terminal app to start a new dotCMS dev environment. All data and assets will be stored in the directory ./data
docker run --rm \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOT_INITIAL_ADMIN_PASSWORD=admin \
dotcms/dotcms-dev:nightly
Once dotCMS has started up, you can can login via HTTPS on port 8443
— there is a self-signed certificate if you are running locally using:
https://local.dotcms.site:8443/dotAdmin
u: admin@dotcms.com
p:
Cloning the dotCMS Demo site#
To clone a site, pass DOTCMS_SOURCE_ENVIRONMENT
and a DOTCMS_USERNAME_PASSWORD
(for the source environment) environmental variables. If you specify a source environment and a valid means to authenticate, the image will attempt to pull the assets and db from the source environment and import them when starting the first time. If you clone the demo site, the user name and password will be admin@dotcms.com / admin.
docker run --rm \
-p 8443:8443 \
-v $PWD/data:/data \
-e DOTCMS_SOURCE_ENVIRONMENT=https://demo.dotcms.com \
-e DOTCMS_USERNAME_PASSWORD="admin@dotcms.com:admin" \
dotcms/dotcms-dev:nightly
Config Env Switches#
This image takes all the normal dotCMS docker environmental variable config switches — keep in mind that the DB and search components come pre-wired, so no need to change those. This image also takes the following environment variables:
DOTCMS_SOURCE_ENVIRONMENT
: The URL for the environment you wish to clone — e.g., https://demo.dotcms.com.DOTCMS_CLONE_TYPE
: Eitherdump
orstarter
; defaults todump
. Set this todump
to take a database dump and asset backup (recommended for large sites). Set this tostarter
to force the target environment to generate a starter to download (slower).DOTCMS_API_TOKEN
: A valid dotCMS API Token from an admin user in the source environment.DOTCMS_USERNAME_PASSWORD
: The username:password for an admin user in the source environment.DOTCMS_DEBUG
: Run dotCMS in debug mode and listen for a remote debugger on port8000
; defaults tofalse
.ALL_ASSETS
: Controls whether old versions of assets are included in the download. Defaults tofalse
, which means only the current live and working versions of assets will be downloaded.DOT_INITIAL_ADMIN_PASSWORD: if this is an empty install, the value of this will dictate the initial admin@dotcms.com password value.
If you need to map in a custom certificate, you can do this by creating a .pem
file of your certificate, private key and ca-chain. The password for the .pem
should be set to dotcms
and should map the generated PEM file to /srv/dotserver/tomcat/conf/local.dotcms.site.pem
in order to override the default certificate.
For more complete information on running the dotCMS dev image, see the documentation page.