title: Cannot source tmux config file in a Dockerfile
body: <p>I'm building a Docker image where I need tmux, and rather than having to run <code>tmux source-file ~/.tmux.conf</code> every time I start the container (that way madness lies), I'd like to source the config file at build time. However, this isn't working:</p>
  <pre><code>ARG PYTORCH=&quot;1.6.0&quot;
  ARG CUDA=&quot;10.1&quot;
  ARG CUDNN=&quot;7&quot;
  
  FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
  
  RUN apt-get update &amp;&amp; apt-get install -y man-db manpages-posix vim screen tmux\
    &amp;&amp; apt-get clean \
    &amp;&amp; rm -rf /var/lib/apt/lists/*
  # configuration for tmux
  COPY src/.tmux.conf ~/.tmux.conf
  RUN tmux source-file ~/.tmux.conf
  </code></pre>
  <p>I get the error:</p>
  <pre><code>error connecting to /tmp/tmux-0/default (No such file or directory)
  The command '/bin/sh -c tmux source-file ~/.tmux.conf' returned a non-zero code: 1
  </code></pre>
  <p>What's happening? It doesn't seem to be a <code>file not found</code> error.</p>