1package daemon // import "github.com/docker/docker/daemon"
2
3import (
4	swarmtypes "github.com/docker/docker/api/types/swarm"
5	"github.com/sirupsen/logrus"
6)
7
8// SetContainerConfigReferences sets the container config references needed
9func (daemon *Daemon) SetContainerConfigReferences(name string, refs []*swarmtypes.ConfigReference) error {
10	if !configsSupported() && len(refs) > 0 {
11		logrus.Warn("configs are not supported on this platform")
12		return nil
13	}
14
15	c, err := daemon.GetContainer(name)
16	if err != nil {
17		return err
18	}
19	c.ConfigReferences = append(c.ConfigReferences, refs...)
20	return nil
21}
22