Skip to content

Container displays label from another container #8545

@aviratna

Description

@aviratna

Background
We are using docker label for various use cases like chargeback, load balancer etc. We came across below issue with docker label.

Issue: If we create a container with docker label and use same docker image to create another container, new container will get created with same docker label though we did not provide the docker label for new container.

vSphere and vCenter Server version
vSphere 6.5

VIC version
VIC 1.5 (probably all versions in the past too)

##### Steps to reproduce

  1. Create a container with docker label
    e.g. docker run --label xyz :
  2. Check for docker label
    docker inspect <container id 1>
  3. Create another container using same docker image. do not pass label parameter
    docker run :
  4. Check the docker label
    docker inspect <container id 2>
  5. New docker container also shows the same docker label from previous container created using same docker image though we did not provided the docker label in docker run.

##### Actual behavior
Container copies the label from another container which are created using same docker image.

##### Expected behavior
Container should only show docker label which are part of docker image or docker label provided during docker run command. Container should not copy label from another container.

Docker Image is immutable, it should not get updated with docker label provided during docker run.

##### Observation
We tried the docker inspect on docker image. Labels got updated for that docker image which were provided during docker run command.

@malikkal

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions