{"id":18917058,"url":"https://github.com/jas0n0ss/docker-sql-ag","last_synced_at":"2025-08-16T17:05:04.243Z","repository":{"id":190324173,"uuid":"447817266","full_name":"Jas0n0ss/Docker-SQL-AG","owner":"Jas0n0ss","description":"SQL Server AG with 3 Nodes on Docker","archived":false,"fork":false,"pushed_at":"2024-03-30T14:59:03.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T07:17:12.479Z","etag":null,"topics":["ag","docker","sqlserver-2017","sqlserverha"],"latest_commit_sha":null,"homepage":"https://git.msft.vip/Docker-SQL-AG/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jas0n0ss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-01-14T02:25:04.000Z","updated_at":"2024-10-03T19:00:47.000Z","dependencies_parsed_at":"2023-08-24T05:34:35.586Z","dependency_job_id":"d6009cfc-1535-471a-941c-270d96edcd8a","html_url":"https://github.com/Jas0n0ss/Docker-SQL-AG","commit_stats":null,"previous_names":["jas0n0ss/docker-sql-ag"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Jas0n0ss/Docker-SQL-AG","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jas0n0ss%2FDocker-SQL-AG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jas0n0ss%2FDocker-SQL-AG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jas0n0ss%2FDocker-SQL-AG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jas0n0ss%2FDocker-SQL-AG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jas0n0ss","download_url":"https://codeload.github.com/Jas0n0ss/Docker-SQL-AG/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jas0n0ss%2FDocker-SQL-AG/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270742043,"owners_count":24637504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"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":["ag","docker","sqlserver-2017","sqlserverha"],"created_at":"2024-11-08T10:23:42.118Z","updated_at":"2025-08-16T17:05:04.219Z","avatar_url":"https://github.com/Jas0n0ss.png","language":"Shell","readme":"# SQL Server AG with 3 Nodes on Docker\n---\n### Environment\n\n  - Node1: `sqlNode1` `1401-\u003e1433` `1521-\u003e5022` (Primary Node)\n  - Node2: `sqlNode1` `1402-\u003e1433` `1522-\u003e5022` (Secondary Node)\n  - Node3: `sqlNode1` `1403-\u003e1433` `1523-\u003e5022` (Secondary Node)\n\n### STEPS\n\n- Prepare the Dockerfile with HA feather [Dockerfile](SQL_AG_Docker/Dockerfile)\n- Build image with Dockerfile just created [create_ha_image.sh](SQL_AG_Docker/create_ha_image.sh)\n- Create `docker-compsoe.yml` to create 3 nodes [docker-compose.yml](SQL_AG_Docker/docker-compose.yml)\n- Create the SQL server nodes with the image which with HA feather \n\n  ```bash\n  [root@node3 /mnt/sqlha_ag 10:57]# docker-compose up -d\n  [root@node3 /mnt/sqlha_ag 10:57]# docker-compose ps\n    Name                Command               State                                         Ports\n  --------------------------------------------------------------------------------------------------------------------------------------\n  sqlNode1   /bin/sh -c /opt/mssql/bin/ ...   Up      0.0.0.0:1401-\u003e1433/tcp,:::1401-\u003e1433/tcp, 0.0.0.0:1521-\u003e5022/tcp,:::1521-\u003e5022/tcp\n  sqlNode2   /bin/sh -c /opt/mssql/bin/ ...   Up      0.0.0.0:1402-\u003e1433/tcp,:::1402-\u003e1433/tcp, 0.0.0.0:1522-\u003e5022/tcp,:::1522-\u003e5022/tcp\n  sqlNode3   /bin/sh -c /opt/mssql/bin/ ...   Up      0.0.0.0:1403-\u003e1433/tcp,:::1403-\u003e1433/tcp, 0.0.0.0:1523-\u003e5022/tcp,:::1523-\u003e5022/tcp\n  ```\n\n- Create the certs ,master key and logins on each nodes [create_cert_all.sh](SQL_AG_Docker/create_cert_all.sh)\n- Sync all certs to each other [sync_all.sh](SQL_AG_Docker/sync_all.sh)\n- Create AG group and Endpoint on Primary Node [create_ag_primary.sh](SQL_AG_Docker/create_ag_primary.sh)\n- Two Secondary nodes join AG group  [join_ag_sec.sh](SQL_AG_Docker/join_ag_sec.sh)\n- Create TestDB and add TestDB to AG [create_TAGDB.sh](SQL_AG_Docker/create_TAGDB.sh)\n- Change roles on each node to test  [change_primary_to_node2.sh](SQL_AG_Docker/change_primary_to_node2.sh)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjas0n0ss%2Fdocker-sql-ag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjas0n0ss%2Fdocker-sql-ag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjas0n0ss%2Fdocker-sql-ag/lists"}