How to create a database at startup with bash

42 views
Skip to first unread message

Ebuzer Taha Kanat

unread,
Feb 11, 2024, 3:12:04 PM2/11/24
to H2 Database
I'm trying to start database

RUN java -cp /tmp/h2/h2.jar org.h2.tools.Server -webAllowOthers

-tcpAllowOthers -ifNotExists -tcpPort 9092

-baseDir /tmp/h2/data -url jdbc:h2:mem:test &


from docker file and documentation says it will create database if it

doesn't exists yet when i connect to Shell it is clear that

jdbc:h2:mem:test database is not created.

I searched the document and couldn't find a way to create db at

startup with using command line

Reply all
Reply to author
Forward
0 new messages