Exactly what it says on the tin. Useful in Spring and other Java applications. This image uses JDK 12 on Oracle Linux.
$ docker run -d -p 9001:9001 --name hsqldb mitchtalmadge/hsqldb
Connection Details:
- URL:
jdbc:hsqldb:hsql://localhost/test
- Username: sa
- Password: (blank)
This image is optimized for use with docker compose.
You can specify the Username and Password with the environment variables HSQLDB_USER
and HSQLDB_PASSWORD
.
$ docker run -d --name hsqldb \
-e "HSQLDB_USER=sa" \
-e "HSQLDB_PASSWORD=password" \
-p 9001:9001 \
mitchtalmadge/hsqldb
If you do not set the environment variables, the defaults are:
- Username: sa
- Password: (blank)
You can adjust the Database Alias with the environment variable: HSQLDB_DATABASE_ALIAS
This will change the JDBC URL.
Example:
$ docker run -d --name hsqldb \
-e "HSQLDB_DATABASE_ALIAS=example" \
-p 9001:9001 \
mitchtalmadge/hsqldb
The correct JDBC URL is now: jdbc:hsqldb:hsql://localhost/example
You can specify the Database Name with the environment variable HSQLDB_DATABASE_NAME
Example:
$ docker run -d --name hsqldb \
-e "HSQLDB_DATABASE_NAME=hsqldb" \
-p 9001:9001 \
mitchtalmadge/hsqldb
Database hsqldb will be available in folder /opt/database
The database files are inside the volume /opt/database and can be mounted.
Example:
$ docker run -d --name hsqldb \
-v ./database:/opt/database \
-p 9001:9001 \
mitchtalmadge/hsqldb
This container supports the following additional settings:
- Disable HSQL Trace Mode (do not display JDBC trace messages):
HSQLDB_TRACE="false"
- Enable HSQL Silent Mode (true => do not display all queries):
HSQLDB_SILENT="true"
- Disable HSQL Remote Connections (can open databases remotely):
HSQLDB_REMOTE="false"
Example:
$ docker run -d --name hsqldb \
-e "HSQLDB_TRACE=false" \
-e "HSQLDB_SILENT=true" \
-e "HSQLDB_REMOTE=false" \
-p 9001:9001 \
mitchtalmadge/hsqldb
You can define start up parameters for the Java Virtual Machine, e.g. setting the memory size.
$ docker run -d --name hsqldb \
-e "JAVA_VM_PARAMETERS=-Xmx512m -Xms256m" \
-p 9001:9001 \
mitchtalmadge/hsqldb