Skip to content
/ h2 Public

H2 Database running as a server in a Docker container

Notifications You must be signed in to change notification settings

nemerosa/h2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This image runs a H2 database in server mode.

Quick Start

To run this image:

docker container run \
   --publish 9092:9082 \
   --detach \
   --name h2 \
   nemerosa/h2

The database can then be accessed using the following JDBC URL:

jdbc:h2:tcp://localhost/yourdb

(assuming your Docker host is also localhost)

Data Volume

The /usr/lib/h2, which contains the H2 databases is also exposed as a volume. Therefore, you can expose this volume on the host:

--volume /my/path/on/host:/usr/lib/h2

or as a named volume:

--volume h2:/usr/lib/h2

Configuration Options

  • JAVA_OPTIONS - options to set when launching the H2 JVM - defaults to an empty string
  • H2_OPTIONS - additional options to pass when starting the H2 server

About

H2 Database running as a server in a Docker container

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages