Skip to content

Commit

Permalink
Merge pull request #2026 from dperny/service-logs-support-tty
Browse files Browse the repository at this point in the history
Error when attempting to do logs on TTY service
  • Loading branch information
aluzzardi authored Mar 9, 2017
2 parents e928827 + 8da4f81 commit 54cfa17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions agent/exec/dockerapi/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,11 @@ func (c *containerAdapter) createVolumes(ctx context.Context) error {
}

func (c *containerAdapter) logs(ctx context.Context, options api.LogSubscriptionOptions) (io.ReadCloser, error) {
conf := c.container.config()
if conf != nil && conf.Tty {
return nil, errors.New("logs not supported on services with TTY")
}

apiOptions := types.ContainerLogsOptions{
Follow: options.Follow,
Timestamps: true,
Expand Down

0 comments on commit 54cfa17

Please sign in to comment.