title: unreadable zsh shell and backspace not work on zsh shell on Docker
body: <p>I used the <code>FROM rails:onbuild</code> image</p>
  
  <ul>
  <li><p>You can see the wrong/unreadable encoding here
  <img src="https://i.imgur.com/lBwQmBC.png" alt=""></p></li>
  <li><p>When I type backspace after <strong>test</strong>, it didn't work, it appended spaces on the shell</p></li>
  </ul>
  
  <p><img src="https://i.imgur.com/28boLmp.png" alt=""></p>
  
  <p>Here's the environment variables ,</p>
  
  <p>any ideas for the bug ?</p>
  
  <pre><code>RUBY_MAJOR=2.2
  RUBY_VERSION=2.2.2
  RUBY_DOWNLOAD_SHA256=5ffc0f317e429e6b29d4a98ac521c3ce65481bfd22a8cf845fa02a7b113d9b44
  GEM_HOME=/usr/local/bundle
  BUNDLE_APP_CONFIG=/usr/local/bundle
  LANG=en_US.UTF-8
  LANGUAGE=en_US:en
  LC_ALL=en_US.UTF-8
  HOME=/root
  LOGNAME=root
  SHLVL=1
  PWD=/associate-app
  OLDPWD=/associate-app
  ZSH=/root/.oh-my-zsh
  PAGER=less
  LESS=-R
  LSCOLORS=Gxfxcxdxbxegedabagacad
  _=/usr/bin/env
  </code></pre>
  
  <h2>DOCEKRFILE   (here's my docker file)</h2>
  
  <pre><code>FROM rails:onbuild
  RUN apt-get update &amp;&amp; apt-get -y upgrade
  RUN apt-get -y -qq --force-yes install \
          build-essential \
          tree \
          locales \
          ruby-dev \
          vim \
          vim-scripts \
          git \
          git-flow\
          curl \
          zsh \
          sudo
  
  
  
  # Install Zsh
  RUN git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh \
        &amp;&amp; cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc \
        &amp;&amp; chsh -s /bin/zsh
  
  RUN sed -i -E "s/^plugins=\((.*)\)$/plugins=(\1 git git-flow ruby tmux)/" ~/.zshrc
  
  
  # Make ssh dir
  RUN mkdir /root/.ssh/
  # Copy over private key, and set permissions
  ADD id_rsa /root/.ssh/id_rsa
  # Create known_hosts
  RUN touch /root/.ssh/known_hosts
  # Add bitbuckets key
  RUN ssh-keyscan bitbucket.org &gt;&gt; /root/.ssh/known_hosts
  
  
  RUN echo "alias ls='ls --color=auto'" &gt;&gt; /etc/zsh/zshrc &amp;&amp; \
      echo "alias ll='ls -halF'" &gt;&gt; /etc/zsh/zshrc &amp;&amp; \
      echo "alias ls='ls --color=auto'" &gt;&gt; /etc/profile &amp;&amp; \
      echo "alias ll='ls -halF'" &gt;&gt; /etc/zsh/zshrc
  
  # copy GEMFILE
  WORKDIR /tmp
  COPY Gemfile Gemfile
  COPY Gemfile.lock Gemfile.lock
  RUN bundle install
  
  RUN mkdir /associate-app
  WORKDIR /associate-app
  ADD . /associate-app
  
  RUN locale-gen en_US.UTF-8  
  ENV LANG en_US.UTF-8  
  ENV LANGUAGE en_US:en  
  ENV LC_ALL en_US.UTF-8  
  CMD echo 'LC_ALL=en_US.UTF-8' &gt;&gt; ~/.zshrc &amp;&amp; \
      echo 'LANG=C.UTF-8' &gt;&gt; ~/.zshrc &amp;&amp; \
      echo 'LC_CTYPE=en_US.UTF-8' &gt;&gt; ~/.zshrc &amp;&amp; \
  CMD ["zsh"]
  </code></pre>
  
  <h3>stty -a</h3>
  
  <pre><code>speed 38400 baud; rows 40; columns 164; line = 0;
  intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = &lt;undef&gt;; eol2 = &lt;undef&gt;; swtch = &lt;undef&gt;; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
  lnext = ^V; flush = ^O; min = 1; time = 0;
  -parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
  -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
  opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
  isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke    
  </code></pre>