Giter VIP home page Giter VIP logo

docker-h2's Introduction

docker-h2

Dockerized H2 database service.

Features

2.x.xxx

There are many changes in this major version, including changes in the information schema tables. An option has been added to the h2.server.properties for convenience to allow you to use the information schema from v1 since it is difficult to find information about this online (OLD_INFORMATION_SCHEMA=true).

Note the use of this property in the constructor of https://github.com/h2database/h2database/blob/master/h2/src/main/org/h2/engine/SessionRemote.java

Trusted builds

Automated builds on docker registry:

Running

Get the image:

docker pull oscarfonts/h2

Run as a service, exposing ports 1521 (TCP database server) and 81 (web interface) and mapping DATA_DIR to host:

docker run -d -p 1521:1521 -p 81:81 -v /path/to/local/data_dir:/opt/h2-data --name=MyH2Instance oscarfonts/h2

Or run as a service with an extra custom config set in the command line, like allowing to create database at connection:

docker run -d -p 1521:1521 -p 81:81 -v /path/to/local/data_dir:/opt/h2-data -e H2_OPTIONS=-ifNotExists --name=MyH2Instance oscarfonts/h2

By the way, please, be aware about the fact, that the option -ifNotExists is not available in docker image 1.1.119, take a look into this issue.

The H2 web console will be available at: http://localhost:81

See the logs while running:

docker logs -f MyH2Instance

Access H2 via CLI:

If you want to access the H2 database via CLI, there is a shell script, named h2cli, that launches H2 Shell. It is already in the $PATH, so you do not need to cd to anywhere. The connection details are specified by the means of options:

  • -u or --user - the user under which to login into H2 db. Default: sa.
  • -d or --dbname - the database which we want to connect to via CLI. Default: test.
  • -p or --port - the connection port. Default: 1521.

Note: h2 cli is available in all images except alpine based

docker-h2's People

Contributors

oscarfonts avatar mipo256 avatar cosmocracy avatar zohnyzeyad avatar zilvinasu avatar davinkevin avatar chadiem avatar sommeri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.