docker

postgresql docker: FATAL: role "root" does not exist

The Problem

When you use docker to run postgresql (ex, postgres:14.5-bullseye) and enabled healthcheck, you might get health status from docker compose ps, but you might see error messages in your docker log.

Sample docker-compose.yml:

Update CI data / database container image for data or database schema changes.

One of the projects I work on uses GitLab . We host our codes on GitLab, review codes and commits, and use GitLab CI to do all the CI auto-testing jobs before we merge branches.

Normally mock data for TDD Unit Test shouldn't be a difficult job, but once we need to do something more complicated, like searching relations in a graph database, or doing some Integration Test, it became a mess, no matter we put them in test codes or put them in separated files and load when needed:

  • updating hundreds of records in a thousands-rows mock dataset .
  • container stats and changes will not be kept across stages and jobs, so in every jobs and stages we need to load them again and again.
  • it takes time and resources to load data into database, and we don't want to wait them long.
  • wasting resources might cause global warming.

在 Docker 中使用 Linux 版微軟 Microsoft SQL Server

最近向我尋求顧問諮詢的組織單位中,其中一個再也受不了微軟的天價授權費勒索,打算用 Linux (Ubuntu) 替換掉所有 Windows Server。用 PHP、Java 以及其他跨平台語言撰寫的服務要轉移很容易。但是其中一些系統使用 MicroSoft SQL Server 作為資料庫。
治本的方法是轉移到 MySQL、MariaDB 或其他 OpenSource 資料庫系統,但那需要時間來處理所有 schema 以及 query 的轉換。
另一個方法是在 Docker 中使用 Linux 版微軟 Microsoft SQL Server 作為暫時性的過渡時期解法。

Running Microsoft SQL Server on Linux in Docker

One of the organizations that recently consulted me for advice, no longer willing to be extortion by Microsoft's high licensing fees, and plans to replace all Windows Server with Linux (Ubuntu). No big deal for services written in PHP, Java, and other cross platform languages. But some of the systems use MicroSoft SQL Server as their Database. The permanent cure is to migrate to MySQL, MariaDB, or other OpenSource Databases. But it takes time to translate all schema and queries. The other solution is to use Microsoft SQL Server on Linux in Docker as a temporary workaround.

Subscribe to RSS - docker