fix: find db images with all kinds of tags

This commit is contained in:
kolaente 2021-12-05 13:54:39 +01:00
parent aa2dc54925
commit 8cbba392f4
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 5 deletions

11
dump.go
View File

@ -11,12 +11,13 @@ type Dumper interface {
}
func NewDumperFromContainer(container *types.ContainerJSON) Dumper {
switch container.Config.Image {
case "mysql":
fallthrough
case "mariadb":
// Containers contain the tags, therefore we need to check them one by one
if strings.HasPrefix(container.Config.Image, "mysql") || strings.HasPrefix(container.Config.Image, "mariadb") {
return NewMysqlDumper(container)
case "postgres":
}
if strings.HasPrefix(container.Config.Image, "postgres") {
return NewPostgresDumper(container)
}