Fix bugs with entrypoint/command in docker-compose run

- When no command is passed but `--entrypoint` is, set Cmd to `[]`
- When command is a single empty string, set Cmd to `[""]`

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
This commit is contained in:
Aanand Prasad 2016-07-11 16:13:16 -04:00
commit 593d1aeb09
6 changed files with 63 additions and 15 deletions

View file

@ -1,2 +0,0 @@
service:
build: .

View file

@ -0,0 +1,6 @@
version: "2"
services:
test:
image: busybox
entrypoint: printf
command: default args

View file

@ -1,3 +1,4 @@
FROM busybox:latest
LABEL com.docker.compose.test_image=true
ENTRYPOINT echo "From prebuilt entrypoint"
ENTRYPOINT ["printf"]
CMD ["default", "args"]

View file

@ -0,0 +1,4 @@
version: "2"
services:
test:
build: .