{"id":25816626,"url":"https://github.com/jonathanpotts/docker-babelfishpg","last_synced_at":"2026-03-03T02:32:35.022Z","repository":{"id":144154060,"uuid":"424701750","full_name":"jonathanpotts/docker-babelfishpg","owner":"jonathanpotts","description":"Docker image for Babelfish for PostgreSQL.","archived":false,"fork":false,"pushed_at":"2026-02-11T05:17:26.000Z","size":50,"stargazers_count":35,"open_issues_count":0,"forks_count":22,"subscribers_count":6,"default_branch":"main","last_synced_at":"2026-02-11T11:24:30.703Z","etag":null,"topics":["docker","postgresql","sql-server"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/jonathanpotts/babelfishpg","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanpotts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jonathanpotts","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-11-04T18:37:23.000Z","updated_at":"2026-02-11T05:17:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1650def-e93d-46fd-928b-a2c78f6e9e27","html_url":"https://github.com/jonathanpotts/docker-babelfishpg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonathanpotts/docker-babelfishpg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2Fdocker-babelfishpg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2Fdocker-babelfishpg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2Fdocker-babelfishpg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2Fdocker-babelfishpg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanpotts","download_url":"https://codeload.github.com/jonathanpotts/docker-babelfishpg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpotts%2Fdocker-babelfishpg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30030829,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"online","status_checked_at":"2026-03-03T02:00:07.650Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","postgresql","sql-server"],"created_at":"2025-02-28T05:37:45.923Z","updated_at":"2026-03-03T02:32:34.990Z","avatar_url":"https://github.com/jonathanpotts.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/jonathanpotts"],"categories":[],"sub_categories":[],"readme":"# docker-babelfishpg\n![Docker Image Version (latest semver)](https://img.shields.io/docker/v/jonathanpotts/babelfishpg) ![Docker Image Size with architecture (latest by date/latest semver)](https://img.shields.io/docker/image-size/jonathanpotts/babelfishpg) ![Docker Pulls](https://img.shields.io/docker/pulls/jonathanpotts/babelfishpg) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jonathanpotts/docker-babelfishpg/docker-image.yml) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jonathanpotts/docker-babelfishpg/babelfish-updates.yml?label=updates)\n\n[Docker](https://www.docker.com/) image for [Babelfish for PostgreSQL](https://babelfishpg.org/).\n\nBabelfish for PostgreSQL is a collection of [extensions](https://github.com/babelfish-for-postgresql/babelfish_extensions) for [PostgreSQL](https://www.postgresql.org/) that enable it to use the [Tabular Data Stream (TDS) protocol](https://docs.microsoft.com/openspecs/windows_protocols/ms-tds) and [Transact-SQL (T-SQL)](https://docs.microsoft.com/sql/t-sql/language-reference) allowing apps designed for [Microsoft SQL Server](https://docs.microsoft.com/sql/sql-server) to utilize PostgreSQL as their database. For more details, see [\"Goodbye Microsoft SQL Server, Hello Babelfish\"](https://aws.amazon.com/blogs/aws/goodbye-microsoft-sql-server-hello-babelfish/) from the AWS News Blog.\n\n## Quick Start\n\n**WARNING: Make sure to create a database dump to backup your data before installing a new image to prevent risk of data loss when changing images.**\n\nTo create a new container, run:\n\n`docker run -d -p 1433:1433 jonathanpotts/babelfishpg`\n\n### Example Data\n\nUse the [example_data.sql](https://github.com/jonathanpotts/docker-babelfishpg/blob/main/example_data.sql) script to populate the database with example data.\n\nYou can then query the database using commands such as:\n\n```sql\nSELECT * FROM example_db.authors;\n```\n\n```sql\nSELECT * FROM example_db.books;\n```\n\n### Advanced Setup\n\nTo initialize with a custom username, append `-u my_username` to the `docker run` command where `my_username` is the username desired.\n\nTo initialize with a custom password, append `-p my_password` to the `docker run` command where `my_password` is the password desired.\n\nTo initialize with a custom database name, append `-d my_database` to the `docker run` command where `my_database` is the database name desired. **This is the name of the database that Babelfish for PostgreSQL uses internally to store the data and is not accessible via TDS.**\n\n#### Migration Mode\n\nBy default, the `single-db` migration mode is used.\nTo use a different migration mode, append `-m migration_mode` to the `docker run` command where `migration_mode` is the value for the migration mode desired.\n\nFor more information about migration modes, see [Single vs. multiple instances](https://babelfishpg.org/docs/installation/single-multiple/).\n\n#### Encryption (SSL) Support\n\nStarting with the `2.3.0` image pushed on Mar 4, 2023, encryption (SSL) support has been added to the image. You will need to configure PostgreSQL to use SSL; for instructions, see [Secure TCP/IP Connections with SSL](https://www.postgresql.org/docs/14/ssl-tcp.html).\n\nAs a very basic example, to enable encryption with a *self-signed* certificate that *expires in 365 days* and has a *subject of localhost*, in the container's terminal run the following commands:\n\n```sh\ncd /data/babelfish\nopenssl req -new -x509 -days 365 -nodes -text -out server.crt -keyout server.key -subj \"/CN=localhost\"\nchmod og-rwx server.key\necho \"ssl = on\" \u003e\u003e postgresql.conf\n```\n\nThen restart the container and encryption support should be enabled.\n\n## Connecting\n\nIf you are hosting the container on your local machine, the server name is `localhost`. Otherwise, use the IP address or DNS-backed fully qualified domain name (FQDN) for the server you are hosting the container on.\n\nUse SQL Server Authentication mode for login.\n\nThe default login for Babelfish is:\n\n* **Username:** `babelfish_user`\n* **Password:** `12345678`\n\nIf you specified a custom username and/or password, use those instead.\n\nMany features in SQL Server Management Studio (SSMS) are currently unsupported.\n\n### Connection string\n\nAssuming Babelfish is hosted on the local machine, using the default settings, and you are trying to connect to a database named `example_db`, the connection string is:\n\n`Data Source=localhost;Initial Catalog=example_db;Persist Security Info=true;User ID=babelfish_user;Password=12345678`\n\n## Data Volume\n\nDatabase data is stored in the `/data` volume.\n\n## Building Docker Image\n\nTo build the Docker image, clone the repository and then run `docker build .`.\n\nTo use a different Babelfish version, you can:\n * Change `ARG BABELFISH_VERSION=\u003cBABELFISH_VERSION_TAG\u003e` in the `Dockerfile`\n * **-or-**\n * Run `docker build . --build-arg BABELFISH_VERSION=\u003cBABELFISH_VERSION_TAG\u003e`\n\nThe Babelfish version tags are listed at https://github.com/babelfish-for-postgresql/babelfish-for-postgresql/tags.\n\n## Other Extensions\n\nAdding other extensions is outside of the scope of this project. They may not be able to be used through Babelfish and may cause issues with the Babelfish extensions or not work as expected.\n\nTo address previous extension request issues, I have created branches for the `plpython3u` and `postgis` extensions. You can use them as examples for making modifications to add extensions you may need.\n\nFuture issues requesting that extensions be added to this project will most likely be closed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpotts%2Fdocker-babelfishpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanpotts%2Fdocker-babelfishpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpotts%2Fdocker-babelfishpg/lists"}