testcontainers / testcontainers/testcontainers-java

SQL Server container improvements regarding licensing

Open
#2,496 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

resolution/acknowledged
Dominant language
Java
Stars
8.7k
Forks
1.9k
Avg merge
2d 17h
Merged PRs (30d)
9

Description

From how I understand SQL Server's docker container licensing, there are two things that need to be provided to the docker image:

  • ACCEPT_EULA=Y
  • MSSQL_PID=<your_product_id | edition_name> (default: Developer)

The current approach of having to place an image name in a static file is a bit clunky and doesn't cover the above sufficiently

  1. I don't want to run SQL Server using a Developer edition license. I prefer the Express Edition. I guess I can use withEnv("MSSQL_PID", "Express") but it would be nice if I had an enum to choose from with API placed directly on MSSQLServerContainer
  2. The Db2Container has an acceptLicense() method, which I think would be nicer than this file on the classpath. Especially, because I'd like to run integration tests using different images of SQL Server, but from the same Maven project, so I cannot easily reuse this file without a build preprocessing step that writes the image name into the file prior to starting the integration tests.

See:
https://hub.docker.com/_/microsoft-mssql-server#environment-variables

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting MSSQLServerContainer and Db2Container, then find the current classpath-based image and license configuration and its integration tests. The work is done when SQL Server users can select the product edition and accept the license through the container API without relying on the static file, with tests covering the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java
Domain
databases, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.