cli icon indicating copy to clipboard operation
cli copied to clipboard

Add labels when using Dockerfile or Compose

Open Roemer opened this issue 1 year ago • 3 comments

This PR adds the possibility to add labels when using a Dockerfile or Compose.

Roemer avatar Nov 07 '24 16:11 Roemer

I have encountered this error in practice. Hope this error will be fixed soon.

johnitvn avatar Nov 19 '24 13:11 johnitvn

We are passing them on here for images: https://github.com/devcontainers/cli/blob/f475b2be4c516e0b7191b338328210eae1ad9d62/src/spec-node/containerFeatures.ts#L116

This is missing here: https://github.com/devcontainers/cli/blob/f475b2be4c516e0b7191b338328210eae1ad9d62/src/spec-node/singleContainer.ts#L215

It is also missing on the Docker Compose code path. Docker Compose doesn't add labels to the built images, it adds them to the containers.

chrmarti avatar Nov 21 '24 09:11 chrmarti

I actually gave it a try and implemented it in this PR, so it is ready for review.

Roemer avatar Aug 25 '25 20:08 Roemer