title: docker run sed doesn't work
body: <p>I'm approaching to <a href="https://www.docker.io" rel="noreferrer">Docker</a>. I created an image debootstraping Debian Jessie and I want to add the <code>contrib</code> section to APT sources file.</p>
  
  <p><code>/etc/apt/sources.list</code> contents are:</p>
  
  <pre><code>$ docker run some/image cat /etc/apt/sources.list
  deb http://debian.fastweb.it/debian jessie main
  deb http://debian.fastweb.it/debian jessie-updates main
  deb http://security.debian.org/ jessie/updates main
  </code></pre>
  
  <p>I want them to be:</p>
  
  <pre><code>deb http://debian.fastweb.it/debian jessie main contrib
  deb http://debian.fastweb.it/debian jessie-updates main contrib
  deb http://security.debian.org/ jessie/updates main contrib
  </code></pre>
  
  <p>So I ran this command:</p>
  
  <pre><code>docker run some/image sed -i 's/main/main contrib/g' /etc/apt/sources.list
  </code></pre>
  
  <p>Which exits without errors; but it doesn't update <code>/etc/apt/sources.list</code> contents:</p>
  
  <pre><code>$ docker run some/image cat /etc/apt/sources.list
  deb http://debian.fastweb.it/debian jessie main
  deb http://debian.fastweb.it/debian jessie-updates main
  deb http://security.debian.org/ jessie/updates main
  </code></pre>