You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a Dockerfile which consists only of the following:
FROM rabbitmq:3.8-management-alpine
COPY rabbitmq_delayed_message_exchange* /plugins/
RUN rabbitmq-plugins enable rabbitmq_delayed_message_exchange
I have the delayed exchange plugin in the same folder as the dockerfile.
Using
var imgBuilder = new ImageFromDockerfileBuilder()
.WithName("rabbitmqtest:custom")
.WithDockerfileDirectory("docker/rabbitmq");
string img = await imgBuilder.Build();
I could not get the image to be tagged. It would always be none:none.
I noticed that when debugging and stopping in
using (var unused = await this.Docker.Images.BuildImageFromDockerfileAsync(stream, new ImageBuildParameters { Dockerfile = config.Dockerfile, Tags = new[] {config.Image.FullName } }, ct))
{
// New Docker image built, ready to use.
}
and remaining there the image would be tagged.
It seemed to me that creation and tagging are two separate processes in BuildImageFromDockerfileAsync and if the stream is disposed to quickly the image will not get tagged.
That also explains why for very simple Dockerfile the tagging will succeed.
To Reproduce
Execute the code mentioned above in a unit test.
Expected behavior
The image should be tagged.
Solution
Reading the stream to the end delays further execution until the image is tagged.
I have provided a PR #238 but your build pipeline seems to be failing during an initial step unrelated to the PR.
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a Dockerfile which consists only of the following:
I have the delayed exchange plugin in the same folder as the dockerfile.
Using
I could not get the image to be tagged. It would always be none:none.
I noticed that when debugging and stopping in
and remaining there the image would be tagged.
It seemed to me that creation and tagging are two separate processes in
BuildImageFromDockerfileAsync
and if the stream is disposed to quickly the image will not get tagged.That also explains why for very simple Dockerfile the tagging will succeed.
To Reproduce
Execute the code mentioned above in a unit test.
Expected behavior
The image should be tagged.
Solution
Reading the stream to the end delays further execution until the image is tagged.
I have provided a PR #238 but your build pipeline seems to be failing during an initial step unrelated to the PR.
The text was updated successfully, but these errors were encountered: