title: problem with remote lldb debugger into docker container
body: <p>Setup is a docker container running ubuntu 16.04, clang/lldb 6.0. I want to be able to remote debug an application, for now via another terminal instead of an IDE.</p>
  <p><strong>My docker file</strong></p>
  <pre><code>FROM ubuntu:16.04
  RUN apt update
  RUN apt install -y curl git nano cmake build-essential xz-utils
  RUN apt install -y clang-6.0 lldb-6.0
  EXPOSE 2000
  CMD [ &quot;/bin/bash&quot; ]
  </code></pre>
  <p><strong>I spin my container as follows</strong></p>
  <p>docker run --privileged --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it -v ~/Developer:/Developer -p 2000:2000 --name cpp-dev ubuntu-clang-dev</p>
  <p><strong>Debugging from within the container works</strong></p>
  <p>I can successfully compile and debug my program with clang++ and lldb when inside the container.</p>
  <p><strong>How I start my lldb-server</strong></p>
  <p>lldb-server-6.0 platform --server --listen *:2000</p>
  <p><strong>Now, from a separate terminal I do:</strong></p>
  <pre><code>&gt; lldb
  &gt; platform select remote-linux
  &gt; platform connect connect://localhost:2000
  &gt; target create test
  &gt; b main     (which returns breakpoint main at main.cpp:5)
  &gt; process launch
  </code></pre>
  <p><strong>Errors:</strong>
  (lldb) process launch
  error: connect remote failed (Failed to connect port)
  error: process launch failed: Failed to connect port</p>
  <p>What am I doing wrong?</p>