Skip to content

Commit

Permalink
ensure setup is called on CommitMainContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
andrestc committed Mar 29, 2018
1 parent 854e637 commit 6f9b980
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/docker/sidecar.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ type Sidecar struct {
}

func (s *Sidecar) CommitMainContainer(ctx context.Context, image string) (Image, error) {
if s.mainContainer.ID == "" {
if err := s.setup(); err != nil {
return Image{}, err
}
}
img, err := s.Client.Commit(ctx, s.mainContainer.ID, image)
if err != nil {
return Image{}, fmt.Errorf("error commiting image %v: %v", image, err)
Expand Down

0 comments on commit 6f9b980

Please sign in to comment.