-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support ImageFromDockerfile authenticated image pulls #2573
Conversation
core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java
Show resolved
Hide resolved
@rnorth WDYT about writing a test for it? IIRC we already have an infrastructure for authenticated pulls |
core/src/main/java/org/testcontainers/images/builder/ImageFromDockerfile.java
Outdated
Show resolved
Hide resolved
… and Docker Compose
@bsideup yeah, I really wanted to do that, and have done so now building upon our existing local private registry test. |
…Dockerfile.java Co-Authored-By: David Byron <dbyron@dbyron.com>
.exec(new PushImageResultCallback()) | ||
.exec(new ResultCallback.Adapter<>()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecation duty.
@Language("yaml") String composeFileContent = | ||
"version: '2.0'\n" + | ||
"services:\n" + | ||
" privateservice:\n" + | ||
" command: /bin/sh -c 'sleep 60'\n" + | ||
" image: " + testImageNameWithTag; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wish we had text blocks!
I would have preferred to just point to a static file on disk, but unfortunately our dockerized private registry has a port number that can vary, and thus the image name changes.
Hence, constructing a tiny YAML file in a string seemed like a tolerable evil.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can, with https://github.com/bsideup/jabel ;)
Co-Authored-By: David Byron <dbyron@dbyron.com>
…#2573) Co-Authored-By: David Byron <dbyron@dbyron.com>
hi @rnorth for example |
#2201 was intended to support authenticated pulls for images required by
ImageFromDockerfile
builds and Docker Compose. Unfortunately there was a bug in theImageFromDockerfile
implementation, which needs patching.Sadly authenticated pulls are not easy to automatically test, so this was missed in manual testing.
This PR: