Skip to content

Commit

Permalink
fix panic in docker driver for newer docker version (18.09.7+) (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyriltovena authored Jul 29, 2019
1 parent 573673a commit b946343
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/docker-driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"syscall"
"time"

"github.com/docker/docker/api/types/backend"
"github.com/docker/docker/api/types/plugins/logdriver"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/jsonfilelog"
Expand Down Expand Up @@ -124,6 +125,9 @@ func consumeLog(lf *logPair) {
msg.Line = buf.Line
msg.Source = buf.Source
if buf.PartialLogMetadata != nil {
if msg.PLogMetaData == nil {
msg.PLogMetaData = &backend.PartialLogMetaData{}
}
msg.PLogMetaData.ID = buf.PartialLogMetadata.Id
msg.PLogMetaData.Last = buf.PartialLogMetadata.Last
msg.PLogMetaData.Ordinal = int(buf.PartialLogMetadata.Ordinal)
Expand Down

0 comments on commit b946343

Please sign in to comment.