Skip to content

Repository files navigation

sql-in-container
----------------
run sql commands and/or load sql files inside of a container
using either sql-in-postgres-container or sql-in-mariadb-container
options common to both scripts:
-p, --port=PORT [DEFAULT=(some free port)]
-s, --sql=FILE_OR_COMMAND	Alternative to positional arguments
-r, --remain-running To access the container afterwards
-v, --verbose
-V, --version print the version and exit
-h, --help print this message and exit
sql-in-postgres-container
-------------------------
./sql-in-postgres-container ./example.sql "SELECT COUNT(*) FROM foo"
specific options:
-b, --base-data-dir=PATH	[DEFAULT=./var/lib/postgresql/data]
-c, --container-version=VERSION	[DEFAULT=17]
sql-in-mariadb-container
------------------------
./sql-in-mariadb-container ./example.sql "SELECT COUNT(*) FROM foo"
specific options:
-b, --var-mdb-dir=PATH [DEFAULT=./var/mariadb]
-c, --container-version=VERSION	[DEFAULT=10.11]
-d, --db-schema-name=NAME	[DEFAULT=test]
License
-------
GNU General Public License (GPL), version 3 or later.
See COPYING or https://www.gnu.org/licenses/gpl-3.0.txt for details.
Copyright (C) 2021-2025 Stichting Open Electronics Lab

About

run sql commands and/or load sql files inside of a container

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages