Skip to content

Commit

Permalink
Fix parsing of docker-compose output. (#424)
Browse files Browse the repository at this point in the history
Set the `COLUMNS` environment variable to an artificially large value for the `docker-compose` process.  This works around newer versions of docker-compose (at least 1.25.0-rc4+) which adjust their output based on the width of the terminal.
  • Loading branch information
GrahamDennis authored and bulldozer-bot[bot] committed Dec 18, 2019
1 parent e35df18 commit 65a2d8a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
9 changes: 9 additions & 0 deletions changelog/@unreleased/pr-424.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
type: fix
fix:
description: |+
Fix parsing of docker-compose output
Set the `COLUMNS` environment variable to an artificially large value for the docker-compose process. This works around newer versions of docker-compose (at least 1.25.0-rc4+) which adjust their output based on the width of the terminal.
links:
- https://github.com/palantir/docker-compose-rule/pull/424
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ public DockerMachine build() {
String hostIp = new RemoteHostIpResolver().resolveIp(dockerHost);

Map<String, String> environment = ImmutableMap.<String, String>builder()
// 2019-12-17: newer docker-compose adjusts its output based on the number of columns available
// in the terminal. This interferes with parsing of the output of docker-compose, so "COLUMNS" is
// set to an artificially large value.
.put("COLUMNS", "10000")
.putAll(dockerEnvironment)
.putAll(additionalEnvironment)
.build();
Expand Down

0 comments on commit 65a2d8a

Please sign in to comment.