Skip to content

Commit 4b94f2c

Browse files
author
Toby McLaughlin
committed
Avoid CR/LF linefeeds in scripts when on Windows
1 parent cb46b84 commit 4b94f2c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ services:
8585
# Any Beats image will suffice. We'll use Metricbeat.
8686
image: docker.elastic.co/beats/metricbeat:${TAG}
8787
volumes: ['./scripts/configure-kibana.sh:/usr/local/bin/configure-kibana.sh:ro']
88-
command: /usr/local/bin/configure-kibana.sh
88+
# The script may have CR/LF linefeeds if using Docker for Windows, so make
89+
# sure that they don't confuse Bash.
90+
command: ['/bin/bash', '-c', 'cat /usr/local/bin/configure-kibana.sh | tr -d "\r" | bash']
8991
environment: ['ELASTIC_VERSION=${ELASTIC_VERSION}']
9092
networks: ['stack']
9193
depends_on: ['kibana']

0 commit comments

Comments
 (0)