H2 Database Server on Alpine Linux base
491
The main features of H2 are:
More details at https://h2database.com
docker run --detach \
--restart unless-stopped \
--publish 8082:8082 --publish 9092:9092 \
--env CONSOLE_PWD=<password> \
--volume $PWD/scripts:/root/scripts \
--volume h2db_data:/root/data/ \
--hostname h2db \
--name h2db \
dev050221/ibr_h2db:server
docker run -it --rm \
--env RUN_AS="CLIENT" \
--volume $PWD/scripts:/root/scripts \
dev050221/ibr_h2db:client
docker run -it --rm \
--env RUN_AS="SCRIPT" \
--volume $PWD/scripts:/root/scripts \
dev050221/ibr_h2db:client
You will need to keep your SQL scripts in $PWD/scripts folder for the container to execute.
dev050221/ibr_h2db:server and dev050221/ibr_h2db:client can both be used interchangeably as server and client.
dev050221/ibr_h2db:client is smaller in size. However, it will not support stored procedures and user defined functions if run as a server.
The Docker image comes with two default databases: northwind and sample with user id and password sa.
The northwind database is curtesy of YugabyteDB.
sample is an empty database that is re-created if deleted.
Go to https://localhost:8082 for a very helpful web console.
docker exec -it h2db readme
docker exec -it h2db listdb
docker exec -it h2db createdb [database name] [database owner] [password]
docker exec -it h2db deletedb [database name]
docker exec -it h2db h2client
docker exec -it h2db runscript
docker exec -it h2db h2server [start | stop] <tcp password>
docker exec -it h2db resetpwd
docker exec -it h2db runtool
You can also log into the container and see the inner workings by executing
docker exec -it h2db ash
This Docker image is provided "as is" without ANY assurance of suitability to purpose.
Content type
Image
Digest
Size
87.5 MB
Last updated
over 4 years ago
docker pull dev050221/ibr_h2db:server