Open tmuras opened 5 years ago
When you run the Docker exec command pass it the -i flag for an interactive terminal
Hi @tmuras,
never tried by myself but it looks like we are missing -i
or -t
or -it
here i.e. something like:
stdin_open: true # Maps -i
#tty: true # Maps -t, In case posix_isatty() requires even a TTY since it is called against STDOUT
for the composition i.e.:
$ git diff
diff --git a/base.yml b/base.yml
index 24f3882..6b7cdc0 100755
--- a/base.yml
+++ b/base.yml
@@ -2,6 +2,8 @@ version: "2"
services:
webserver:
image: "moodlehq/moodle-php-apache:${MOODLE_DOCKER_PHP_VERSION}"
+ stdin_open: true
+ #tty: true
depends_on:
- db
volumes:
It would be a nice add-on if it will work, given the right combination (just -i
or -it
or -t
).
HTH, Matteo
Have anybody tried this? exec, base.yml or both? I know I can try, heh, just I'm lazy :-)
Thanks @stronk7 for referring me to this task. I can confirm that @tmuras workaround to comment out the thrown exception during an interaction session on the Docker container did indeed work (after connecting via docker exec -it docker_webserver_1 bash
)
Using the step "And I pause scenario execution" triggers an exception:
Break point should only be used with interative terminal. (Behat\Mink\Exception\ExpectationException)
even it the tests are run from inside docker container, using interactive session.
The good news is that it's only the check that is not working in docker:
Simply commenting out throwing an exception line will make the step to behave correctly: