Skip to content

Commit

Permalink
chore: enable prestart hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpig committed Dec 8, 2024
1 parent eef54aa commit 7aeb86c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions container/container_start.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ func (c *Container) Start(log *zerolog.Logger) error {
}

// FIXME: 'prestart' hook is deprecated and appears to break 'docker run'??
// if err := c.ExecHooks("prestart", log); err != nil {
// // TODO: run DELETE tasks here, then...
// if err := c.ExecHooks("poststop", log); err != nil {
// log.Warn().Err(err).Msg("failed to execute poststop hooks")
// fmt.Println("WARNING: failed to execute poststop hooks")
// }
//
// return fmt.Errorf("failed to run prestart hooks: %w", err)
// }
if err := c.ExecHooks("prestart", log); err != nil {
// TODO: run DELETE tasks here, then...
if err := c.ExecHooks("poststop", log); err != nil {
log.Warn().Err(err).Msg("failed to execute poststop hooks")
fmt.Println("WARNING: failed to execute poststop hooks")
}

log.Warn().Err(err).Msg("failed to execute prestart hooks")
}

if _, err := conn.Write([]byte("start")); err != nil {
return fmt.Errorf("send start over ipc: %w", err)
Expand Down

0 comments on commit 7aeb86c

Please sign in to comment.