Skip to content

Keep image and version of the containers in Dockerfile files #2341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Jul 11, 2025

Closes #2269

We are trying to achieve two things:

  • Make it possible for dependabot to upgrade the containers
    automatically
  • Collect the image and version of the containers we use for testing in
    one place

Note that the test suite will still create and start the containers
programmatically, but it will read the first FROM line in
each Dockerfile to extract the image and version to use. It will ignore
everything else.

My initial plan was to configure each containers using the Dockerfile
directly, but I prefer to reuse the existing Testcontainers classes for
each database (for example, PostgreSQLContainer) because they contain
out-of-the-box configuration that I would need to copy somewhere else.

DavideD added 3 commits July 11, 2025 11:45
We are trying to achieve two things:
* Make it possible for dependabot to upgrade the containers
  automatically
* Collect the image and version of the containers we use for testing in
  one place

Note that the test suite will still create and start the containers
programmatically, but it will read the first FROM line in each Dockerfile
to extract the image and version to use. It will ignore everything else.

My initial plan was to configure each container using the Dockerfile
directly, but I prefer to reuse the exsisting Testcontainers classes for
each database (for example, PostgreSQLContainer) because they contain
out-of-the-box configuration that I would need to copy somewhere else.

In any case, this is a good starting point and we can improve it later.
@DavideD DavideD changed the title 2269 db version Keep image and version of the containers in Dockerfile files Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move database versions to Docker files
1 participant