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

fix: Do not pre pull Dockerfile build stages that do not correspond to base images #979

Merged
merged 5 commits into from
Aug 21, 2023

Conversation

HofmeisterAn
Copy link
Collaborator

@HofmeisterAn HofmeisterAn commented Aug 19, 2023

What does this PR do?

This pull request excludes Dockerfile build stages that do not correspond to base images.

Why is it important?

This pull request addresses an issue related to building Docker images that have dependencies on base images from private registries. Currently, Testcontainers encounters an issue when attempting to pull actual images. Testcontainers does not distinguish between base images and intermediate build stages. Intermediate build stages cannot be pulled; Testcontainers must ignore these stages. E.g. the second line of the following Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
FROM build

Related issues

Follow-ups

Testcontainers for .NET cannot resolve variables (ARGs) during the Docker image build process. Currently, Testcontainers ignores all base images that utilize variables. To pull these base images in advance too, Testcontainers needs to have the capability to resolve the default values or build arguments of variables.

@HofmeisterAn HofmeisterAn added the bug Something isn't working label Aug 19, 2023
@netlify
Copy link

netlify bot commented Aug 19, 2023

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit fe793a8
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-dotnet/deploys/64e38609ea1b82000842b323
😎 Deploy Preview https://deploy-preview-979--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@HofmeisterAn HofmeisterAn merged commit 23ef5a2 into develop Aug 21, 2023
13 checks passed
@HofmeisterAn HofmeisterAn deleted the bugfix/972-do-not-pre-pull-dockerfile-stages branch August 21, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants