Skip to content
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

[Enhancement]: Add Target field to FromDockerfile struct #1926

Closed
danvergara opened this issue Nov 27, 2023 · 1 comment · Fixed by #1931
Closed

[Enhancement]: Add Target field to FromDockerfile struct #1926

danvergara opened this issue Nov 27, 2023 · 1 comment · Fixed by #1931
Labels
enhancement New feature or request

Comments

@danvergara
Copy link
Contributor

Proposal

I've been trying to add testcontainers to my employer's CI, so my teammates can run integration tests. At some point, I needed to build a container image based off an existing Dockerfile, but the problem is that I need to specify a target stage to run the container in a test mode, where test dependencies are included.

I found out that buildOptions is omitting the Target field, which is present in the ImageBuildOptions struct. Is there a reason to not expose this field?

@mdelapenya
Copy link
Collaborator

Hey @danvergara thanks for opening this issue. I've submitted #1931, which implements a mechanism for users to modify the image build options type if needed. That will simplify future additions, as instead of adding multiple methods to the FromDockerfile struct, we simply allow users to define the modifier with the changes, having access to the Docker type.

Of course, this change comes with a breaking change, which is caused by the need of adding a new method to the ImageBuildInfo interface. This is usually undesired, but will serve as preparation of a more stable API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants