diff --git a/environment/docker/environment.go b/environment/docker/environment.go index 9209dc5..7b3d803 100644 --- a/environment/docker/environment.go +++ b/environment/docker/environment.go @@ -176,3 +176,9 @@ func (e *Environment) SetStopConfiguration(c *api.ProcessStopConfiguration) { e.meta.Stop = c e.mu.Unlock() } + +func (e *Environment) SetImage(i string) { + e.mu.Lock() + e.meta.Image = i + e.mu.Unlock() +} diff --git a/server/server.go b/server/server.go index a24e185..c5f9cf3 100644 --- a/server/server.go +++ b/server/server.go @@ -137,6 +137,7 @@ func (s *Server) SyncWithConfiguration(cfg *api.ServerConfigurationResponse) err // the process isn't just terminated when a user requests it be stopped. if e, ok := s.Environment.(*docker.Environment); ok { s.Log().Debug("syncing stop configuration with configured docker environment") + e.SetImage(s.Config().Container.Image) e.SetStopConfiguration(&cfg.ProcessConfiguration.Stop) }