Sign inSign up

schemaspy/schemaspy

By schemaspy

•Updated 7 months ago

Travic-ci builds of schemaspy docker image

Image
53

1M+

schemaspy/schemaspy repository overview

This repository will hold snapshot (latest build of schemaspy) and releases when available. latest will always point towards latest release.

⁠Info

Project can be found @ github⁠ (any issues should be reported there) You can read the dockerfile here⁠

The image contains drivers for:

  • mysql
  • mariadb
  • postgresql
  • jtds

Images uses 2 envs:

  • SCHEMASPY_DRIVERS defaults to /drivers (looks for custom mounted drivers)
  • SCHEMASPY_OUTPUT defaults to /output (will write output to this folder) These paths are local to the container, they rarely need to change (CI might be one reason SCHAMESPY_OUTPUT=/work/target/report)

⁠Use image

docker run -v "$PWD:/output" schemaspy/schemaspy:[snapshot, latest or specific version] [options]

⁠Use config file

docker run -v "$PWD:/output" -v "[path-to-config-file]:/schemaspy.properties" schemaspy/schemaspy:[snapshot, latest or specific version] [options]

⁠Use schemaMeta

docker run -v "$PWD:/output" -v "[path-to-schemameta-file]:/schemameta.xml" schemaspy/schemaspy:[snapshot, latest or specific version] -meta schemameta.xml [options]

⁠Example

Current directory /home/user
I have a config-file named prod_1_mysql.properties
I have a sub dir called schemaspy_prod_1_mysql
I have newer mysql drivers in a sub dir called mysql_driver
I have a custom database type file called my_mysql.properties

I then run
docker run -v "/home/user/schemaspy_prod_1_mysql:/output" -v "/home/user/prod_1_mysql.properties:/schemaspy.properties" -v "/home/user/mysql_driver:/drivers" -v "/home/user/my_mysql.properties:/my_mysql.properties" schemaspy/schemaspy:snapshot

Check tags⁠ for available versions

Note: Don't use options -o (this is already set to /output(env SCHEMASPY_OUTPUT) which should be mounted), -dp (this is already handled by adding the included drivers or all drivers in /drivers)

You can read more about the options in the docs⁠

⁠Cavets

Depending on OS you can't run with --network="host" to gain access to host with 127.0.0.1 (OSX, Windows)
So don't use loopback, you might get stuck in the container. Adding an alias for the loopback is possible and will work else use something other than localhost or 127.0.0.1.

Depending on OS and where you run the container $PWD might be in a part of your filesystem that isn't shared with docker (OSX, Windows)

Make sure the host mount volume exists and is writable. Container runs under a different user than root, so you need to give other writable access to the folder.

Tag summary

Content type

Image

Digest

sha256:c8f98116a…

Size

183.4 MB

Last updated

over 1 year ago

docker pull schemaspy/schemaspy