https://github.com/informaticsmatters/docker-sql-client
Code for a simple SQL client container image
https://github.com/informaticsmatters/docker-sql-client
Last synced: about 2 months ago
JSON representation
Code for a simple SQL client container image
- Host: GitHub
- URL: https://github.com/informaticsmatters/docker-sql-client
- Owner: InformaticsMatters
- License: apache-2.0
- Created: 2020-01-13T07:43:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-16T12:34:25.000Z (over 5 years ago)
- Last Synced: 2025-03-20T21:49:26.427Z (about 1 year ago)
- Language: Dockerfile
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker SQL Client


[](https://www.codefactor.io/repository/github/informaticsmatters/docker-sql-client)
A simple Alpine-based container image for SQL-database client operations.
The image **CMD** executes `/home/client/script.sh`. Mount your own script
in order to execute your own PostgreSQL or MySQL commands.
Built with: -
- psql client v12.1
- mysql client v15.1
As you will need to execute commands for a remote PostgreSQL database
you will need to map content into the [pgpass] file `/home/client/.pgpass`.
This file should contain lines of the following format:
hostname:port:database:username:password
> On Unix systems, the permissions on a password file must disallow any
access to world or group; achieve this by a command such as
`chmod 0600 ~/.pgpass`. If the permissions are less strict than this
the file will be ignored.
To build and push a specific **tag**, use docker-compose: -
$ IMAGE_TAG=2020.2 docker-compose build
$ IMAGE_TAG=2020.2 docker-compose push
---
[pgpass]: https://www.postgresql.org/docs/12/libpq-pgpass.html