mirror of
https://github.com/docker/compose.git
synced 2026-07-11 18:54:35 +00:00
as --no-build is set, set service image to default image name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
This commit is contained in:
parent
085d8e9bb7
commit
abf5f736c7
7 changed files with 27 additions and 20 deletions
|
|
@ -445,3 +445,12 @@ const (
|
|||
// UserCancel user cancelled compose up, we are stopping containers
|
||||
UserCancel
|
||||
)
|
||||
|
||||
// GetImageNameOrDefault computes the default image name for a service, used to tag built images
|
||||
func GetImageNameOrDefault(service types.ServiceConfig, projectName string) string {
|
||||
imageName := service.Image
|
||||
if imageName == "" {
|
||||
imageName = projectName + "_" + service.Name
|
||||
}
|
||||
return imageName
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue