How can you define what labels will be used for an image built using Docker Compose?
Experience Level: Senior
Tags: Docker Compose
Answer
Use labels: property of your service:
version: "3.9"
services:
my-service:
build:
context: .
labels:
- com.example.description: "Our awesome service"
- com.example.department: "IT"
Related Docker Compose job interview questions
What are Docker Compose profiles good for?
Docker Compose SeniorHow can you run a one off command using Docker Compose?
Docker Compose SeniorHow can you override a command that will be executed in a container of a specific service in Docker Compose?
Docker Compose SeniorHow do you map ports to a specific service container in Docker Compose?
Docker Compose SeniorHow do you comment out lines that you don't want to be processed by Docker Compose?
Docker Compose Senior
Chat
Oh, the operator is not available. Leave us your comments. We will answer all your questions as soon as possible.
Anonymous
Καλησπέρα.
Καλησπέρα.
Anonymous
the infinteis -3/15 so 1triition / infinet
the infinteis -3/15 so 1triition / infinet
Anonymous
e
e
Anonymous
<a href="https://inspirum.pl "
<a href="https://inspirum.pl "
Anonymous
[url]https://inspirum.pl[/url]
[url]https://inspirum.pl[/url]
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e
LaceJaguar65
e
e