Skip to content

Resolve "Add docker support for interactive web terminal"

What does this MR do?

Add support of interactive web terminal for the docker executor.

Support for docker+machine executor will be done in a separate MR

Things to do

  • Proxy stdout/in/err to WebSocket
  • Wrap types.HijackedResponse as an io.ReadWriteCloser and pass that to the terminal package instead, so no new dependencies are added to gitlab-terminal
  • Make sure it behaves the same as the k8s/shell executor
  • All connection closing is handled properly with no panics
  • Migrate the changes to gitlab-terminal to upstream repo
  • See if we need to log errors inside of the terminal package or use the channels we already have for read/write methods for docker
  • Do not remove container if a terminal is connected. Only remove it if after disconnect.
  • Add documentation about the wait for terminal limitation for docker executor.

Behavior of web terminal

  • Open connection with the container
  • The user has shell access to the container

What the user doesn't have when using docker executor

  • The wait behaviour, since the nature of docker itself, is to run a script and as soon as it exits the container is down, persistent connections are not possible with the current lifecycle of the containers. In !1024 (closed) we change the lifecycle of the docker container so we are able to persist connections.

Sep-20-2018_16-23-46

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

!1024 (closed) to make waitForTerminal to work

gitlab-terminal!3 (merged)

Closes #3467 (closed)

Edited by Steve Xuereb

Merge request reports