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:
parent
8f842d55d7
commit
2ecbf25445
6 changed files with 63 additions and 15 deletions
|
|
@ -1,2 +0,0 @@
|
|||
service:
|
||||
build: .
|
||||
6
tests/fixtures/entrypoint-composefile/docker-compose.yml
vendored
Normal file
6
tests/fixtures/entrypoint-composefile/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
version: "2"
|
||||
services:
|
||||
test:
|
||||
image: busybox
|
||||
entrypoint: printf
|
||||
command: default args
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
FROM busybox:latest
|
||||
LABEL com.docker.compose.test_image=true
|
||||
ENTRYPOINT echo "From prebuilt entrypoint"
|
||||
ENTRYPOINT ["printf"]
|
||||
CMD ["default", "args"]
|
||||
4
tests/fixtures/entrypoint-dockerfile/docker-compose.yml
vendored
Normal file
4
tests/fixtures/entrypoint-dockerfile/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
version: "2"
|
||||
services:
|
||||
test:
|
||||
build: .
|
||||
Loading…
Add table
Add a link
Reference in a new issue