-
Notifications
You must be signed in to change notification settings - Fork 174
Description
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
- Create a container with docker label
e.g. docker run --label xyz:
- Check for docker label
docker inspect <container id 1> - Create another container using same docker image. do not pass label parameter
docker run:
- Check the docker label
docker inspect <container id 2> - 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.