fix bad label parsing
This commit is contained in:
@@ -478,6 +478,14 @@ func convertLabels(labels map[string]string) Labels {
|
|||||||
func (dh *DockerHelper) parseLocalConfiguration(labels map[string]string) (config.ContainerConfiguration, error) {
|
func (dh *DockerHelper) parseLocalConfiguration(labels map[string]string) (config.ContainerConfiguration, error) {
|
||||||
c := dh.config.GlobalContainerConfiguration
|
c := dh.config.GlobalContainerConfiguration
|
||||||
|
|
||||||
|
if enable, ok := labels["com.thelilfrog.image.update.enable"]; ok {
|
||||||
|
if strings.ToLower(enable) == "true" {
|
||||||
|
c.Enabled = true
|
||||||
|
} else {
|
||||||
|
c.Enabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if schedule, ok := labels["com.thelilfrog.image.update.schedule"]; ok {
|
if schedule, ok := labels["com.thelilfrog.image.update.schedule"]; ok {
|
||||||
_, err := cron.ParseStandard(schedule)
|
_, err := cron.ParseStandard(schedule)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user